diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-12 15:02:15 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-12 15:02:15 +0000 |
commit | 8687895abba4209a6de8d8a8fc1bda5996f0d875 (patch) | |
tree | a2123e967e7c9906d787a5cec94ec53894d32734 /libs/ardour | |
parent | 0c80b01f4724922a95d22fc441d6854da001c442 (diff) |
remove using namespace sigc everywhere to ensure clarity over which bind/mem_fun is being used; make Config::map_parameters take a boost::function rather than a sigc::slot ; continue debugging crash caused by regionviews not tracking their Region's lifetime
git-svn-id: svn://localhost/ardour2/branches/3.0@6357 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
38 files changed, 147 insertions, 154 deletions
diff --git a/libs/ardour/analyser.cc b/libs/ardour/analyser.cc index 992e5c5246..c19657baaf 100644 --- a/libs/ardour/analyser.cc +++ b/libs/ardour/analyser.cc @@ -26,7 +26,6 @@ #include "pbd/convert.h" using namespace std; -using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h index bd164a08e9..02bbcaca23 100644 --- a/libs/ardour/ardour/configuration.h +++ b/libs/ardour/ardour/configuration.h @@ -19,7 +19,7 @@ #ifndef __ardour_configuration_h__ #define __ardour_configuration_h__ - +#include <boost/function.hpp> #include "pbd/stateful.h" #include "ardour/configuration_variable.h" @@ -33,7 +33,7 @@ class Configuration : public PBD::Stateful Configuration(); virtual ~Configuration(); - virtual void map_parameters (sigc::slot<void, std::string> s) = 0; + virtual void map_parameters (boost::function<void (std::string)>&) = 0; virtual int set_state (XMLNode const &, int) = 0; virtual XMLNode & get_state () = 0; virtual XMLNode & get_variables () = 0; diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h index 555c925a01..ad31aac44e 100644 --- a/libs/ardour/ardour/rc_configuration.h +++ b/libs/ardour/ardour/rc_configuration.h @@ -36,7 +36,7 @@ class RCConfiguration : public Configuration public: RCConfiguration(); - void map_parameters (sigc::slot<void, std::string>); + void map_parameters (boost::function<void (std::string)>&); int set_state (XMLNode const &, int version); XMLNode& get_state (); XMLNode& get_variables (); diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index 20df86ca4d..d19c28f0cb 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -29,7 +29,7 @@ class SessionConfiguration : public Configuration public: SessionConfiguration (); - void map_parameters (sigc::slot<void, std::string>); + void map_parameters (boost::function<void (std::string)>&); int set_state (XMLNode const &, int version); XMLNode& get_state (); XMLNode& get_variables (); diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 6df18e681d..40411f4133 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1506,7 +1506,7 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca continue; /* XXX is this OK? */ } - region->GoingAway.connect (bind (mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr<Region>(region))); + region->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr<Region>(region))); _last_capture_regions.push_back (region); diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 9649439487..63013426cb 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -35,7 +35,6 @@ #include "i18n.h" using namespace ARDOUR; -using namespace sigc; using namespace std; using namespace PBD; @@ -532,8 +531,8 @@ AudioPlaylist::add_crossfade (boost::shared_ptr<Crossfade> xfade) } else { _crossfades.push_back (xfade); - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); + xfade->Invalidated.connect (sigc::mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); + xfade->StateChanged.connect (sigc::mem_fun (*this, &AudioPlaylist::crossfade_changed)); notify_crossfade_added (xfade); } @@ -588,8 +587,8 @@ AudioPlaylist::set_state (const XMLNode& node, int version) try { boost::shared_ptr<Crossfade> xfade = boost::shared_ptr<Crossfade> (new Crossfade (*((const Playlist *)this), *child)); _crossfades.push_back (xfade); - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); + xfade->Invalidated.connect (sigc::mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); + xfade->StateChanged.connect (sigc::mem_fun (*this, &AudioPlaylist::crossfade_changed)); NewCrossfade(xfade); } diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index f190b50bd6..68081661ad 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -185,7 +185,7 @@ AudioTrack::set_diskstream (boost::shared_ptr<AudioDiskstream> ds, void * /*src* if (audio_diskstream()->deprecated_io_node) { if (!IO::connecting_legal) { - IO::ConnectingLegal.connect (mem_fun (*this, &AudioTrack::deprecated_use_diskstream_connections)); + IO::ConnectingLegal.connect (sigc::mem_fun (*this, &AudioTrack::deprecated_use_diskstream_connections)); } else { deprecated_use_diskstream_connections (); } @@ -307,7 +307,7 @@ AudioTrack::_set_state (const XMLNode& node, int version, bool call_base) pending_state = const_cast<XMLNode*> (&node); if (_session.state_of_the_state() & Session::Loading) { - _session.StateReady.connect (mem_fun (*this, &AudioTrack::set_state_part_two)); + _session.StateReady.connect (sigc::mem_fun (*this, &AudioTrack::set_state_part_two)); } else { set_state_part_two (); } diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index e46f8ed3fd..d660616bb3 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -98,7 +98,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, n { boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src); if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); + afs->HeaderPositionOffsetChanged.connect (sigc::mem_fun (*this, &AudioRegion::source_offset_changed)); } init (); @@ -115,7 +115,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, n { boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src); if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); + afs->HeaderPositionOffsetChanged.connect (sigc::mem_fun (*this, &AudioRegion::source_offset_changed)); } init (); @@ -207,7 +207,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, const Sour boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> ((*i)); if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); + afs->HeaderPositionOffsetChanged.connect (sigc::mem_fun (*this, &AudioRegion::source_offset_changed)); } } @@ -231,7 +231,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, const XMLNode& nod { boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src); if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); + afs->HeaderPositionOffsetChanged.connect (sigc::mem_fun (*this, &AudioRegion::source_offset_changed)); } init (); @@ -272,7 +272,7 @@ void AudioRegion::connect_to_analysis_changed () { for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->AnalysisChanged.connect (mem_fun (*this, &AudioRegion::invalidate_transients)); + (*i)->AnalysisChanged.connect (sigc::mem_fun (*this, &AudioRegion::invalidate_transients)); } } @@ -287,7 +287,7 @@ AudioRegion::connect_to_header_position_offset_changed () unique_srcs.insert (*i); boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (*i); if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); + afs->HeaderPositionOffsetChanged.connect (sigc::mem_fun (*this, &AudioRegion::source_offset_changed)); } } } @@ -296,9 +296,9 @@ AudioRegion::connect_to_header_position_offset_changed () void AudioRegion::listen_to_my_curves () { - _envelope->StateChanged.connect (mem_fun (*this, &AudioRegion::envelope_changed)); - _fade_in->StateChanged.connect (mem_fun (*this, &AudioRegion::fade_in_changed)); - _fade_out->StateChanged.connect (mem_fun (*this, &AudioRegion::fade_out_changed)); + _envelope->StateChanged.connect (sigc::mem_fun (*this, &AudioRegion::envelope_changed)); + _fade_in->StateChanged.connect (sigc::mem_fun (*this, &AudioRegion::fade_in_changed)); + _fade_out->StateChanged.connect (sigc::mem_fun (*this, &AudioRegion::fade_out_changed)); } void diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 9db604cd54..dbb76c005e 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -72,7 +72,7 @@ Auditioner::Auditioner (Session& s) _main_outs->allow_pan_reset (); _main_outs->reset_panner (); - _output->changed.connect (mem_fun (*this, &Auditioner::output_changed)); + _output->changed.connect (sigc::mem_fun (*this, &Auditioner::output_changed)); the_region.reset ((AudioRegion*) 0); g_atomic_int_set (&_active, 0); diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index c0a652275c..db8f5bb799 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -34,7 +34,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; using namespace PBD; sigc::signal<void,AutomationList *> AutomationList::AutomationListCreated; diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index e94829898a..d15283c85c 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -66,7 +66,7 @@ void ControlProtocolManager::set_session (Session& s) { _session = &s; - _session->GoingAway.connect (mem_fun (*this, &ControlProtocolManager::drop_session)); + _session->GoingAway.connect (sigc::mem_fun (*this, &ControlProtocolManager::drop_session)); for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { if ((*i)->requested || (*i)->mandatory) { diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index ec2ae7d4cc..07489687c1 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -64,10 +64,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Mute _display_to_user = false; if (_output) { - _output->changed.connect (mem_fun (*this, &Delivery::output_changed)); + _output->changed.connect (sigc::mem_fun (*this, &Delivery::output_changed)); } - CycleStart.connect (mem_fun (*this, &Delivery::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &Delivery::cycle_start)); } /* deliver to a new IO object */ @@ -88,10 +88,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const string& _display_to_user = false; if (_output) { - _output->changed.connect (mem_fun (*this, &Delivery::output_changed)); + _output->changed.connect (sigc::mem_fun (*this, &Delivery::output_changed)); } - CycleStart.connect (mem_fun (*this, &Delivery::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &Delivery::cycle_start)); } /* deliver to a new IO object, reconstruct from XML */ @@ -116,10 +116,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& } if (_output) { - _output->changed.connect (mem_fun (*this, &Delivery::output_changed)); + _output->changed.connect (sigc::mem_fun (*this, &Delivery::output_changed)); } - CycleStart.connect (mem_fun (*this, &Delivery::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &Delivery::cycle_start)); } /* deliver to an existing IO object, reconstruct from XML */ @@ -144,10 +144,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> out, boost::shared_ptr<Mut } if (_output) { - _output->changed.connect (mem_fun (*this, &Delivery::output_changed)); + _output->changed.connect (sigc::mem_fun (*this, &Delivery::output_changed)); } - CycleStart.connect (mem_fun (*this, &Delivery::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &Delivery::cycle_start)); } std::string @@ -419,7 +419,7 @@ Delivery::reset_panner () } } else { panner_legal_c.disconnect (); - panner_legal_c = PannersLegal.connect (mem_fun (*this, &Delivery::panners_became_legal)); + panner_legal_c = PannersLegal.connect (sigc::mem_fun (*this, &Delivery::panners_became_legal)); } } diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index b1d5a92355..ee279c601d 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -143,13 +143,13 @@ Diskstream::set_route (Route& r) _io = _route->input(); ic_connection.disconnect(); - ic_connection = _io->changed.connect (mem_fun (*this, &Diskstream::handle_input_change)); + ic_connection = _io->changed.connect (sigc::mem_fun (*this, &Diskstream::handle_input_change)); input_change_pending = ConfigurationChanged; non_realtime_input_change (); set_align_style_from_io (); - _route->GoingAway.connect (mem_fun (*this, &Diskstream::route_going_away)); + _route->GoingAway.connect (sigc::mem_fun (*this, &Diskstream::route_going_away)); } void @@ -342,9 +342,9 @@ Diskstream::use_playlist (boost::shared_ptr<Playlist> playlist) reset_write_sources (false); } - plmod_connection = _playlist->Modified.connect (mem_fun (*this, &Diskstream::playlist_modified)); - plgone_connection = _playlist->GoingAway.connect (bind (mem_fun (*this, &Diskstream::playlist_deleted), boost::weak_ptr<Playlist>(_playlist))); - plregion_connection = _playlist->RangesMoved.connect (mem_fun (*this, &Diskstream::playlist_ranges_moved)); + plmod_connection = _playlist->Modified.connect (sigc::mem_fun (*this, &Diskstream::playlist_modified)); + plgone_connection = _playlist->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Diskstream::playlist_deleted), boost::weak_ptr<Playlist>(_playlist))); + plregion_connection = _playlist->RangesMoved.connect (sigc::mem_fun (*this, &Diskstream::playlist_ranges_moved)); } /* don't do this if we've already asked for it *or* if we are setting up diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc index 86d0a2deea..41c29f43f1 100644 --- a/libs/ardour/internal_return.cc +++ b/libs/ardour/internal_return.cc @@ -33,14 +33,14 @@ InternalReturn::InternalReturn (Session& s) : Return (s, true) , user_count (0) { - CycleStart.connect (mem_fun (*this, &InternalReturn::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &InternalReturn::cycle_start)); } InternalReturn::InternalReturn (Session& s, const XMLNode& node) : Return (s, node, true) , user_count (0) { - CycleStart.connect (mem_fun (*this, &InternalReturn::cycle_start)); + CycleStart.connect (sigc::mem_fun (*this, &InternalReturn::cycle_start)); } void diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 0fc498be7f..e10857a2a9 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -43,8 +43,8 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost: set_name (sendto->name()); - _send_to->GoingAway.connect (mem_fun (*this, &InternalSend::send_to_going_away)); - _send_to->NameChanged.connect (mem_fun (*this, &InternalSend::send_to_name_changed)); + _send_to->GoingAway.connect (sigc::mem_fun (*this, &InternalSend::send_to_going_away)); + _send_to->NameChanged.connect (sigc::mem_fun (*this, &InternalSend::send_to_name_changed)); } InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node) @@ -187,7 +187,7 @@ InternalSend::set_our_state (const XMLNode& node, int version) */ if (!IO::connecting_legal) { - connect_c = IO::ConnectingLegal.connect (mem_fun (*this, &InternalSend::connect_when_legal)); + connect_c = IO::ConnectingLegal.connect (sigc::mem_fun (*this, &InternalSend::connect_when_legal)); } else { connect_when_legal (); } diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index fe2dfb1f7a..d8d7ec88a5 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -567,7 +567,7 @@ IO::set_state (const XMLNode& node, int version) pending_state_node = new XMLNode (node); pending_state_node_version = version; pending_state_node_in = false; - connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal)); + connection_legal_c = ConnectingLegal.connect (sigc::mem_fun (*this, &IO::connecting_became_legal)); } @@ -620,7 +620,7 @@ IO::set_state_2X (const XMLNode& node, int version, bool in) pending_state_node = new XMLNode (node); pending_state_node_version = version; pending_state_node_in = in; - connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal)); + connection_legal_c = ConnectingLegal.connect (sigc::mem_fun (*this, &IO::connecting_became_legal)); } return 0; diff --git a/libs/ardour/jack_slave.cc b/libs/ardour/jack_slave.cc index 94a12319f2..9ef6eb8579 100644 --- a/libs/ardour/jack_slave.cc +++ b/libs/ardour/jack_slave.cc @@ -30,7 +30,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; JACK_Slave::JACK_Slave (jack_client_t* j) : jack (j) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index b3421d2b0b..24e4628c0b 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -41,7 +41,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; using namespace PBD; Location::Location (const Location& other) diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index 53f819e54a..e2b83a1e65 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -39,7 +39,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; using namespace MIDI; using namespace PBD; @@ -79,11 +78,11 @@ MIDIClock_Slave::rebind (MIDI::Port& p) std::cerr << "MIDIClock_Slave: connecting to port " << port->name() << std::endl; #endif - connections.push_back (port->input()->timing.connect (mem_fun (*this, &MIDIClock_Slave::update_midi_clock))); - connections.push_back (port->input()->start.connect (mem_fun (*this, &MIDIClock_Slave::start))); - connections.push_back (port->input()->contineu.connect (mem_fun (*this, &MIDIClock_Slave::contineu))); - connections.push_back (port->input()->stop.connect (mem_fun (*this, &MIDIClock_Slave::stop))); - connections.push_back (port->input()->position.connect (mem_fun (*this, &MIDIClock_Slave::position))); + connections.push_back (port->input()->timing.connect (sigc::mem_fun (*this, &MIDIClock_Slave::update_midi_clock))); + connections.push_back (port->input()->start.connect (sigc::mem_fun (*this, &MIDIClock_Slave::start))); + connections.push_back (port->input()->contineu.connect (sigc::mem_fun (*this, &MIDIClock_Slave::contineu))); + connections.push_back (port->input()->stop.connect (sigc::mem_fun (*this, &MIDIClock_Slave::stop))); + connections.push_back (port->input()->position.connect (sigc::mem_fun (*this, &MIDIClock_Slave::position))); } void diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 176ec156f0..f780948d69 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -1024,7 +1024,7 @@ MidiDiskstream::transport_stopped (struct tm& /*when*/, time_t /*twhen*/, bool a continue; /* XXX is this OK? */ } - region->GoingAway.connect (bind (mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr<Region>(region))); + region->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr<Region>(region))); _last_capture_regions.push_back (region); diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index f523ab056f..307655bff8 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -32,7 +32,6 @@ #include "i18n.h" using namespace std; -using namespace sigc; using namespace ARDOUR; using namespace MIDI; using namespace MIDI::Name; @@ -45,7 +44,7 @@ void MidiPatchManager::set_session (Session& s) { _session = &s; - _session->GoingAway.connect (mem_fun (*this, &MidiPatchManager::drop_session)); + _session->GoingAway.connect (sigc::mem_fun (*this, &MidiPatchManager::drop_session)); refresh(); } diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index a1fb01a7bb..b230f6f6d5 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -40,7 +40,6 @@ #include "i18n.h" using namespace ARDOUR; -using namespace sigc; using namespace std; MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 2bec1e6901..ebbe231e62 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -233,7 +233,7 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base) pending_state = const_cast<XMLNode*> (&node); if (_session.state_of_the_state() & Session::Loading) { - _session.StateReady.connect (mem_fun (*this, &MidiTrack::set_state_part_two)); + _session.StateReady.connect (sigc::mem_fun (*this, &MidiTrack::set_state_part_two)); } else { set_state_part_two (); } diff --git a/libs/ardour/midi_ui.cc b/libs/ardour/midi_ui.cc index ffcec00de7..1bb10d713f 100644 --- a/libs/ardour/midi_ui.cc +++ b/libs/ardour/midi_ui.cc @@ -44,7 +44,7 @@ MidiControlUI::MidiControlUI (Session& s) : AbstractUI<MidiUIRequest> (_("midiui")) , _session (s) { - MIDI::Manager::instance()->PortsChanged.connect (mem_fun (*this, &MidiControlUI::change_midi_ports)); + MIDI::Manager::instance()->PortsChanged.connect (sigc::mem_fun (*this, &MidiControlUI::change_midi_ports)); } MidiControlUI::~MidiControlUI () @@ -125,7 +125,7 @@ MidiControlUI::reset_ports () if ((fd = (*i)->selectable ()) >= 0) { Glib::RefPtr<IOSource> psrc = IOSource::create (fd, IO_IN|IO_HUP|IO_ERR); - psrc->connect (bind (mem_fun (*this, &MidiControlUI::midi_input_handler), (*i))); + psrc->connect (sigc::bind (sigc::mem_fun (*this, &MidiControlUI::midi_input_handler), (*i))); psrc->attach (_main_loop->get_context()); // glibmm hack: for now, store only the GSource* diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 95fa4d984a..3e06efa56f 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -37,7 +37,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; using namespace MIDI; using namespace PBD; @@ -94,9 +93,9 @@ MTC_Slave::rebind (MIDI::Port& p) port = &p; - connections.push_back (port->input()->mtc_time.connect (mem_fun (*this, &MTC_Slave::update_mtc_time))); - connections.push_back (port->input()->mtc_qtr.connect (mem_fun (*this, &MTC_Slave::update_mtc_qtr))); - connections.push_back (port->input()->mtc_status.connect (mem_fun (*this, &MTC_Slave::update_mtc_status))); + connections.push_back (port->input()->mtc_time.connect (sigc::mem_fun (*this, &MTC_Slave::update_mtc_time))); + connections.push_back (port->input()->mtc_qtr.connect (sigc::mem_fun (*this, &MTC_Slave::update_mtc_qtr))); + connections.push_back (port->input()->mtc_status.connect (sigc::mem_fun (*this, &MTC_Slave::update_mtc_status))); } void diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 3e1ea79477..29beb7c6b7 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -267,7 +267,7 @@ Playlist::init (bool hide) freeze_length = 0; _explicit_relayering = false; - Modified.connect (mem_fun (*this, &Playlist::mark_session_dirty)); + Modified.connect (sigc::mem_fun (*this, &Playlist::mark_session_dirty)); } Playlist::~Playlist () @@ -602,7 +602,7 @@ Playlist::add_region_internal (boost::shared_ptr<Region> region, nframes_t posit } region_state_changed_connections.push_back ( - region->StateChanged.connect (sigc::bind (mem_fun (this, &Playlist::region_changed_proxy), + region->StateChanged.connect (sigc::bind (sigc::mem_fun (this, &Playlist::region_changed_proxy), boost::weak_ptr<Region> (region))) ); diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc index e187622757..a68d0d3b94 100644 --- a/libs/ardour/rc_configuration.cc +++ b/libs/ardour/rc_configuration.cc @@ -309,12 +309,12 @@ RCConfiguration::set_variables (const XMLNode& node) } void -RCConfiguration::map_parameters (sigc::slot<void, std::string> theSlot) +RCConfiguration::map_parameters (boost::function<void (std::string)>& functor) { #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(type,var,name,value) theSlot (name); -#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) theSlot (name); +#define CONFIG_VARIABLE(type,var,name,value) functor (name); +#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) functor (name); #include "ardour/rc_configuration_vars.h" #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 33baa12d20..2c4d8004cf 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -111,7 +111,7 @@ Region::Region (boost::shared_ptr<Source> src, nframes_t start, nframes_t length _sources.push_back (src); _master_sources.push_back (src); - src->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), src)); + src->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), src)); assert(_sources.size() > 0); _positional_lock_style = AudioTime; @@ -341,7 +341,7 @@ Region::~Region () { DEBUG_TRACE (DEBUG::Destruction, string_compose ("Region %1 destructor @ %2\n", _name, this)); notify_callbacks (); - GoingAway (); /* EMIT SIGNAL */ + drop_references (); } void @@ -1419,6 +1419,7 @@ void Region::source_deleted (boost::shared_ptr<Source>) { _sources.clear (); + drop_references (); } vector<string> @@ -1587,14 +1588,14 @@ Region::use_sources (SourceList const & s) for (SourceList::const_iterator i = s.begin (); i != s.end(); ++i) { _sources.push_back (*i); - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), *i)); + (*i)->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), *i)); unique_srcs.insert (*i); } for (SourceList::const_iterator i = s.begin (); i != s.end(); ++i) { _master_sources.push_back (*i); if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), *i)); + (*i)->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), *i)); } } } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 0bf43fdcc5..3390245828 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -94,7 +94,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type) /* now that we have _meter, its safe to connect to this */ - _meter_connection = Metering::connect (mem_fun (*this, &Route::meter)); + _meter_connection = Metering::connect (sigc::mem_fun (*this, &Route::meter)); } Route::Route (Session& sess, const XMLNode& node, DataType default_type) @@ -110,7 +110,7 @@ Route::Route (Session& sess, const XMLNode& node, DataType default_type) /* now that we have _meter, its safe to connect to this */ - _meter_connection = Metering::connect (mem_fun (*this, &Route::meter)); + _meter_connection = Metering::connect (sigc::mem_fun (*this, &Route::meter)); } void @@ -148,8 +148,8 @@ Route::init () _input.reset (new IO (_session, _name, IO::Input, _default_type)); _output.reset (new IO (_session, _name, IO::Output, _default_type)); - _input->changed.connect (mem_fun (this, &Route::input_change_handler)); - _output->changed.connect (mem_fun (this, &Route::output_change_handler)); + _input->changed.connect (sigc::mem_fun (this, &Route::input_change_handler)); + _output->changed.connect (sigc::mem_fun (this, &Route::output_change_handler)); /* add amp processor */ @@ -794,7 +794,7 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite // XXX: do we want to emit the signal here ? change call order. processor->activate (); } - processor->ActiveChanged.connect (bind (mem_fun (_session, &Session::update_latency_compensation), false, false)); + processor->ActiveChanged.connect (sigc::bind (sigc::mem_fun (_session, &Session::update_latency_compensation), false, false)); _output->set_user_latency (0); } @@ -1049,7 +1049,7 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter return -1; } - (*i)->ActiveChanged.connect (bind (mem_fun (_session, &Session::update_latency_compensation), false, false)); + (*i)->ActiveChanged.connect (sigc::bind (sigc::mem_fun (_session, &Session::update_latency_compensation), false, false)); } _output->set_user_latency (0); diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index d7ac672f9a..3d98c61548 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -38,7 +38,6 @@ #include "i18n.h" using namespace ARDOUR; -using namespace sigc; using namespace std; RouteGroup::RouteGroup (Session& s, const string &n, Flag f, Property p) @@ -78,7 +77,7 @@ RouteGroup::add (boost::shared_ptr<Route> r) routes->push_back (r); r->join_route_group (this); - r->GoingAway.connect (sigc::bind (mem_fun (*this, &RouteGroup::remove_when_going_away), boost::weak_ptr<Route> (r))); + r->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &RouteGroup::remove_when_going_away), boost::weak_ptr<Route> (r))); _session.set_dirty (); changed (); /* EMIT SIGNAL */ diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 0b71ad84cd..fbe8edfa80 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -191,8 +191,8 @@ Session::Session (AudioEngine &eng, _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - Config->ParameterChanged.connect (bind (mem_fun (*this, &Session::config_changed), false)); - config.ParameterChanged.connect (bind (mem_fun (*this, &Session::config_changed), true)); + Config->ParameterChanged.connect (sigc::bind (sigc::mem_fun (*this, &Session::config_changed), false)); + config.ParameterChanged.connect (sigc::bind (sigc::mem_fun (*this, &Session::config_changed), true)); if (was_dirty) { DirtyChanged (); /* EMIT SIGNAL */ @@ -324,7 +324,7 @@ Session::Session (AudioEngine &eng, _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - Config->ParameterChanged.connect (bind (mem_fun (*this, &Session::config_changed), false)); + Config->ParameterChanged.connect (sigc::bind (sigc::mem_fun (*this, &Session::config_changed), false)); } Session::~Session () @@ -411,7 +411,7 @@ Session::destroy () tmp = i; ++tmp; - DEBUG_TRACE(DEBUG::Destruction, string_compose ("Dropping for region %1 (%2); pre-ref = %2\n", i->second->name(), i->second.get(), i->second.use_count())); + DEBUG_TRACE(DEBUG::Destruction, string_compose ("Dropping for region %1 (%2); pre-ref = %3\n", i->second->name(), i->second.get(), i->second.use_count())); i->second->drop_references (); DEBUG_TRACE(DEBUG::Destruction, string_compose ("region post ref = %1\n", i->second.use_count())); i = tmp; @@ -514,12 +514,15 @@ Session::when_engine_running () BootMessage (_("Using configuration")); - Config->map_parameters (bind (mem_fun (*this, &Session::config_changed), false)); - config.map_parameters (bind (mem_fun (*this, &Session::config_changed), true)); + boost::function<void (std::string)> ff (boost::bind (&Session::config_changed, this, _1, false)); + boost::function<void (std::string)> ft (boost::bind (&Session::config_changed, this, _1, true)); + + Config->map_parameters (ff); + config.map_parameters (ft); /* every time we reconnect, recompute worst case output latencies */ - _engine.Running.connect (mem_fun (*this, &Session::set_worst_io_latencies)); + _engine.Running.connect (sigc::mem_fun (*this, &Session::set_worst_io_latencies)); if (synced_to_jack()) { _engine.transport_stop (); @@ -873,7 +876,7 @@ Session::diskstream_playlist_changed (boost::weak_ptr<Diskstream> wp) boost::shared_ptr<Playlist> playlist; if ((playlist = dstream->playlist()) != 0) { - playlist->LengthChanged.connect (mem_fun (this, &Session::playlist_length_changed)); + playlist->LengthChanged.connect (sigc::mem_fun (this, &Session::playlist_length_changed)); } /* see comment in playlist_length_changed () */ @@ -1013,9 +1016,9 @@ Session::set_auto_punch_location (Location* location) auto_punch_end_changed_connection.disconnect(); auto_punch_changed_connection.disconnect(); - auto_punch_start_changed_connection = location->start_changed.connect (mem_fun (this, &Session::auto_punch_start_changed)); - auto_punch_end_changed_connection = location->end_changed.connect (mem_fun (this, &Session::auto_punch_end_changed)); - auto_punch_changed_connection = location->changed.connect (mem_fun (this, &Session::auto_punch_changed)); + auto_punch_start_changed_connection = location->start_changed.connect (sigc::mem_fun (this, &Session::auto_punch_start_changed)); + auto_punch_end_changed_connection = location->end_changed.connect (sigc::mem_fun (this, &Session::auto_punch_end_changed)); + auto_punch_changed_connection = location->changed.connect (sigc::mem_fun (this, &Session::auto_punch_changed)); location->set_auto_punch (true, this); @@ -1057,11 +1060,11 @@ Session::set_auto_loop_location (Location* location) auto_loop_changed_connection.disconnect(); auto_loop_start_changed_connection = location->start_changed.connect ( - mem_fun (this, &Session::auto_loop_changed)); + sigc::mem_fun (this, &Session::auto_loop_changed)); auto_loop_end_changed_connection = location->end_changed.connect ( - mem_fun (this, &Session::auto_loop_changed)); + sigc::mem_fun (this, &Session::auto_loop_changed)); auto_loop_changed_connection = location->changed.connect ( - mem_fun (this, &Session::auto_loop_changed)); + sigc::mem_fun (this, &Session::auto_loop_changed)); location->set_auto_loop (true, this); @@ -1655,7 +1658,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m route_group->add (track); } - track->DiskstreamChanged.connect (mem_fun (this, &Session::resort_routes)); + track->DiskstreamChanged.connect (sigc::mem_fun (this, &Session::resort_routes)); //track->set_remote_control_id (control_id); new_routes.push_back (track); @@ -1830,7 +1833,7 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod track->audio_diskstream()->non_realtime_input_change(); - track->DiskstreamChanged.connect (mem_fun (this, &Session::resort_routes)); + track->DiskstreamChanged.connect (sigc::mem_fun (this, &Session::resort_routes)); track->set_remote_control_id (control_id); ++control_id; @@ -2155,12 +2158,12 @@ Session::add_routes (RouteList& new_routes, bool save) boost::weak_ptr<Route> wpr (*x); - (*x)->listen_changed.connect (sigc::bind (mem_fun (*this, &Session::route_listen_changed), wpr)); - (*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), wpr)); - (*x)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed)); - (*x)->output()->changed.connect (mem_fun (*this, &Session::set_worst_io_latencies_x)); - (*x)->processors_changed.connect (mem_fun (*this, &Session::route_processors_changed)); - (*x)->route_group_changed.connect (mem_fun (*this, &Session::route_group_changed)); + (*x)->listen_changed.connect (sigc::bind (sigc::mem_fun (*this, &Session::route_listen_changed), wpr)); + (*x)->solo_changed.connect (sigc::bind (sigc::mem_fun (*this, &Session::route_solo_changed), wpr)); + (*x)->mute_changed.connect (sigc::mem_fun (*this, &Session::route_mute_changed)); + (*x)->output()->changed.connect (sigc::mem_fun (*this, &Session::set_worst_io_latencies_x)); + (*x)->processors_changed.connect (sigc::mem_fun (*this, &Session::route_processors_changed)); + (*x)->route_group_changed.connect (sigc::mem_fun (*this, &Session::route_group_changed)); if ((*x)->is_master()) { _master_out = (*x); @@ -2300,11 +2303,11 @@ Session::add_diskstream (boost::shared_ptr<Diskstream> dstream) /* writer goes out of scope, copies ds back to main */ } - dstream->PlaylistChanged.connect (sigc::bind (mem_fun (*this, &Session::diskstream_playlist_changed), boost::weak_ptr<Diskstream> (dstream))); + dstream->PlaylistChanged.connect (sigc::bind (sigc::mem_fun (*this, &Session::diskstream_playlist_changed), boost::weak_ptr<Diskstream> (dstream))); /* this will connect to future changes, and check the current length */ diskstream_playlist_changed (boost::weak_ptr<Diskstream> (dstream)); - dstream->RecordEnableChanged.connect (mem_fun (*this, &Session::update_have_rec_enabled_diskstream)); + dstream->RecordEnableChanged.connect (sigc::mem_fun (*this, &Session::update_have_rec_enabled_diskstream)); dstream->prepare (); @@ -2818,8 +2821,8 @@ Session::add_regions (vector<boost::shared_ptr<Region> >& new_regions) } } - region->StateChanged.connect (sigc::bind (mem_fun (*this, &Session::region_changed), boost::weak_ptr<Region>(region))); - region->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_region), boost::weak_ptr<Region>(region))); + region->StateChanged.connect (sigc::bind (sigc::mem_fun (*this, &Session::region_changed), boost::weak_ptr<Region>(region))); + region->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Session::remove_region), boost::weak_ptr<Region>(region))); update_region_name_map (region); } @@ -3007,7 +3010,7 @@ Session::add_source (boost::shared_ptr<Source> source) } if (result.second) { - source->GoingAway.connect (sigc::bind (mem_fun (this, &Session::remove_source), boost::weak_ptr<Source> (source))); + source->GoingAway.connect (sigc::bind (sigc::mem_fun (this, &Session::remove_source), boost::weak_ptr<Source> (source))); set_dirty(); } @@ -3398,7 +3401,7 @@ Session::add_playlist (boost::shared_ptr<Playlist> playlist, bool unused) bool existing = playlists->add (playlist); if (!existing) { - playlist->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_playlist), boost::weak_ptr<Playlist>(playlist))); + playlist->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Session::remove_playlist), boost::weak_ptr<Playlist>(playlist))); } if (unused) { @@ -3572,7 +3575,7 @@ Session::graph_reordered () void Session::add_processor (Processor* processor) { - processor->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_processor), processor)); + processor->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Session::remove_processor), processor)); set_dirty(); } diff --git a/libs/ardour/session_configuration.cc b/libs/ardour/session_configuration.cc index 0cdb85bfd0..899b85e770 100644 --- a/libs/ardour/session_configuration.cc +++ b/libs/ardour/session_configuration.cc @@ -112,12 +112,12 @@ SessionConfiguration::set_variables (const XMLNode& node) } void -SessionConfiguration::map_parameters (sigc::slot<void, std::string> theSlot) +SessionConfiguration::map_parameters (boost::function<void (std::string)>& functor) { #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(type,var,name,value) theSlot (name); -#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) theSlot (name); +#define CONFIG_VARIABLE(type,var,name,value) functor (name); +#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) functor (name); #include "ardour/session_configuration_vars.h" #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 4388fe6dca..d006097f09 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -209,38 +209,38 @@ Session::set_mmc_port (string port_tag) } mmc->Play.connect - (mem_fun (*this, &Session::mmc_deferred_play)); + (sigc::mem_fun (*this, &Session::mmc_deferred_play)); mmc->DeferredPlay.connect - (mem_fun (*this, &Session::mmc_deferred_play)); + (sigc::mem_fun (*this, &Session::mmc_deferred_play)); mmc->Stop.connect - (mem_fun (*this, &Session::mmc_stop)); + (sigc::mem_fun (*this, &Session::mmc_stop)); mmc->FastForward.connect - (mem_fun (*this, &Session::mmc_fast_forward)); + (sigc::mem_fun (*this, &Session::mmc_fast_forward)); mmc->Rewind.connect - (mem_fun (*this, &Session::mmc_rewind)); + (sigc::mem_fun (*this, &Session::mmc_rewind)); mmc->Pause.connect - (mem_fun (*this, &Session::mmc_pause)); + (sigc::mem_fun (*this, &Session::mmc_pause)); mmc->RecordPause.connect - (mem_fun (*this, &Session::mmc_record_pause)); + (sigc::mem_fun (*this, &Session::mmc_record_pause)); mmc->RecordStrobe.connect - (mem_fun (*this, &Session::mmc_record_strobe)); + (sigc::mem_fun (*this, &Session::mmc_record_strobe)); mmc->RecordExit.connect - (mem_fun (*this, &Session::mmc_record_exit)); + (sigc::mem_fun (*this, &Session::mmc_record_exit)); mmc->Locate.connect - (mem_fun (*this, &Session::mmc_locate)); + (sigc::mem_fun (*this, &Session::mmc_locate)); mmc->Step.connect - (mem_fun (*this, &Session::mmc_step)); + (sigc::mem_fun (*this, &Session::mmc_step)); mmc->Shuttle.connect - (mem_fun (*this, &Session::mmc_shuttle)); + (sigc::mem_fun (*this, &Session::mmc_shuttle)); mmc->TrackRecordStatusChange.connect - (mem_fun (*this, &Session::mmc_record_enable)); + (sigc::mem_fun (*this, &Session::mmc_record_enable)); /* also handle MIDI SPP because its so common */ - _mmc_port->input()->start.connect (mem_fun (*this, &Session::spp_start)); - _mmc_port->input()->contineu.connect (mem_fun (*this, &Session::spp_continue)); - _mmc_port->input()->stop.connect (mem_fun (*this, &Session::spp_stop)); + _mmc_port->input()->start.connect (sigc::mem_fun (*this, &Session::spp_start)); + _mmc_port->input()->contineu.connect (sigc::mem_fun (*this, &Session::spp_continue)); + _mmc_port->input()->stop.connect (sigc::mem_fun (*this, &Session::spp_stop)); Config->set_mmc_port_name (port_tag); @@ -641,7 +641,7 @@ Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps) if (!step_queued) { if (midi_control_ui) { RefPtr<TimeoutSource> tsrc = TimeoutSource::create (100); - tsrc->connect (mem_fun (*this, &Session::mmc_step_timeout)); + tsrc->connect (sigc::mem_fun (*this, &Session::mmc_step_timeout)); tsrc->attach (midi_control_ui->main_loop()->get_context()); step_queued = true; } diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc index 55ca8da0bc..5af0dc4caa 100644 --- a/libs/ardour/session_playlists.cc +++ b/libs/ardour/session_playlists.cc @@ -73,7 +73,7 @@ SessionPlaylists::add (boost::shared_ptr<Playlist> playlist) if (!existing) { playlists.insert (playlists.begin(), playlist); - playlist->InUse.connect (sigc::bind (mem_fun (*this, &SessionPlaylists::track), boost::weak_ptr<Playlist>(playlist))); + playlist->InUse.connect (sigc::bind (sigc::mem_fun (*this, &SessionPlaylists::track), boost::weak_ptr<Playlist>(playlist))); } return existing; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 74578039a8..3364de9815 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -165,7 +165,7 @@ Session::first_stage_init (string fullpath, string snapshot_name) _base_frame_rate = _current_frame_rate; _tempo_map = new TempoMap (_current_frame_rate); - _tempo_map->StateChanged.connect (mem_fun (*this, &Session::tempo_map_changed)); + _tempo_map->StateChanged.connect (sigc::mem_fun (*this, &Session::tempo_map_changed)); _non_soloed_outs_muted = false; @@ -267,20 +267,20 @@ Session::first_stage_init (string fullpath, string snapshot_name) delta_accumulator_cnt = 0; _slave_state = Stopped; - _engine.GraphReordered.connect (mem_fun (*this, &Session::graph_reordered)); + _engine.GraphReordered.connect (sigc::mem_fun (*this, &Session::graph_reordered)); /* These are all static "per-class" signals */ - RegionFactory::CheckNewRegion.connect (mem_fun (*this, &Session::add_region)); - SourceFactory::SourceCreated.connect (mem_fun (*this, &Session::add_source)); - PlaylistFactory::PlaylistCreated.connect (mem_fun (*this, &Session::add_playlist)); - Processor::ProcessorCreated.connect (mem_fun (*this, &Session::add_processor)); - NamedSelection::NamedSelectionCreated.connect (mem_fun (*this, &Session::add_named_selection)); - AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list)); + RegionFactory::CheckNewRegion.connect (sigc::mem_fun (*this, &Session::add_region)); + SourceFactory::SourceCreated.connect (sigc::mem_fun (*this, &Session::add_source)); + PlaylistFactory::PlaylistCreated.connect (sigc::mem_fun (*this, &Session::add_playlist)); + Processor::ProcessorCreated.connect (sigc::mem_fun (*this, &Session::add_processor)); + NamedSelection::NamedSelectionCreated.connect (sigc::mem_fun (*this, &Session::add_named_selection)); + AutomationList::AutomationListCreated.connect (sigc::mem_fun (*this, &Session::add_automation_list)); - Controllable::Destroyed.connect (mem_fun (*this, &Session::remove_controllable)); + Controllable::Destroyed.connect (sigc::mem_fun (*this, &Session::remove_controllable)); - IO::PortCountChanged.connect (mem_fun (*this, &Session::ensure_buffers)); + IO::PortCountChanged.connect (sigc::mem_fun (*this, &Session::ensure_buffers)); /* stop IO objects from doing stuff until we're ready for them */ @@ -332,15 +332,15 @@ Session::second_stage_init (bool new_session) _state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave|Loading); - _locations.changed.connect (mem_fun (this, &Session::locations_changed)); - _locations.added.connect (mem_fun (this, &Session::locations_added)); + _locations.changed.connect (sigc::mem_fun (this, &Session::locations_changed)); + _locations.added.connect (sigc::mem_fun (this, &Session::locations_added)); setup_click_sounds (0); setup_midi_control (); /* Pay attention ... */ - _engine.Halted.connect (mem_fun (*this, &Session::engine_halted)); - _engine.Xrun.connect (mem_fun (*this, &Session::xrun_recovery)); + _engine.Halted.connect (sigc::mem_fun (*this, &Session::engine_halted)); + _engine.Xrun.connect (sigc::mem_fun (*this, &Session::xrun_recovery)); try { when_engine_running(); diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index a632ae067d..63bb4c4213 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -47,7 +47,6 @@ using namespace std; using namespace ARDOUR; -using namespace sigc; using namespace PBD; void diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 5836bdd95c..7f66486425 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -193,7 +193,7 @@ SndFileSource::init_sndfile () } AudioFileSource::HeaderPositionOffsetChanged.connect ( - mem_fun (*this, &SndFileSource::handle_header_position_change)); + sigc::mem_fun (*this, &SndFileSource::handle_header_position_change)); } int diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index 7f7ca32907..ab0a7144a8 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -36,8 +36,8 @@ void Ticker::set_session(Session& s) _session = &s; if (_session) { - _session->tick.connect(mem_fun (*this, &Ticker::tick)); - _session->GoingAway.connect(mem_fun (*this, &Ticker::going_away)); + _session->tick.connect(sigc::mem_fun (*this, &Ticker::tick)); + _session->GoingAway.connect(sigc::mem_fun (*this, &Ticker::going_away)); } } @@ -47,13 +47,13 @@ void MidiClockTicker::set_session(Session& s) if (_session) { _session->MIDIClock_PortChanged.connect( - mem_fun (*this, &MidiClockTicker::update_midi_clock_port)); + sigc::mem_fun (*this, &MidiClockTicker::update_midi_clock_port)); _session->TransportStateChange.connect( - mem_fun (*this, &MidiClockTicker::transport_state_changed)); + sigc::mem_fun (*this, &MidiClockTicker::transport_state_changed)); _session->PositionChanged.connect( - mem_fun (*this, &MidiClockTicker::position_changed)); + sigc::mem_fun (*this, &MidiClockTicker::position_changed)); _session->TransportLooped.connect( - mem_fun (*this, &MidiClockTicker::transport_looped)); + sigc::mem_fun (*this, &MidiClockTicker::transport_looped)); update_midi_clock_port(); } } |