diff options
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index d8e3b2843c..b2a1aa8da8 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -103,17 +103,17 @@ using boost::weak_ptr; bool Session::_disable_all_loaded_plugins = false; -boost::signals2::signal<void(std::string)> Session::Dialog; -boost::signals2::signal<int()> Session::AskAboutPendingState; -boost::signals2::signal<int(nframes_t,nframes_t)> Session::AskAboutSampleRateMismatch; -boost::signals2::signal<void()> Session::SendFeedback; - -boost::signals2::signal<void()> Session::TimecodeOffsetChanged; -boost::signals2::signal<void()> Session::StartTimeChanged; -boost::signals2::signal<void()> Session::EndTimeChanged; -boost::signals2::signal<void()> Session::AutoBindingOn; -boost::signals2::signal<void()> Session::AutoBindingOff; -boost::signals2::signal<void(std::string, std::string)> Session::Exported; +PBD::Signal1<void,std::string> Session::Dialog; +PBD::Signal0<int> Session::AskAboutPendingState; +PBD::Signal2<int,nframes_t,nframes_t> Session::AskAboutSampleRateMismatch; +PBD::Signal0<void> Session::SendFeedback; + +PBD::Signal0<void> Session::TimecodeOffsetChanged; +PBD::Signal0<void> Session::StartTimeChanged; +PBD::Signal0<void> Session::EndTimeChanged; +PBD::Signal0<void> Session::AutoBindingOn; +PBD::Signal0<void> Session::AutoBindingOff; +PBD::Signal2<void,std::string, std::string> Session::Exported; static void clean_up_session_event (SessionEvent* ev) { delete ev; } const SessionEvent::RTeventCallback Session::rt_cleanup (clean_up_session_event); @@ -189,8 +189,8 @@ Session::Session (AudioEngine &eng, _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - scoped_connect (Config->ParameterChanged, boost::bind (&Session::config_changed, this, _1, false)); - scoped_connect (config.ParameterChanged, boost::bind (&Session::config_changed, this, _1, true)); + Config->ParameterChanged.connect (*this, boost::bind (&Session::config_changed, this, _1, false)); + config.ParameterChanged.connect (*this, boost::bind (&Session::config_changed, this, _1, true)); if (was_dirty) { DirtyChanged (); /* EMIT SIGNAL */ @@ -326,7 +326,7 @@ Session::Session (AudioEngine &eng, _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - scoped_connect (Config->ParameterChanged, boost::bind (&Session::config_changed, this, _1, false)); + Config->ParameterChanged.connect (*this, boost::bind (&Session::config_changed, this, _1, false)); } Session::~Session () @@ -524,7 +524,7 @@ Session::when_engine_running () /* every time we reconnect, recompute worst case output latencies */ - scoped_connect (_engine.Running, boost::bind (&Session::set_worst_io_latencies, this)); + _engine.Running.connect (*this, boost::bind (&Session::set_worst_io_latencies, this)); if (synced_to_jack()) { _engine.transport_stop (); @@ -878,7 +878,7 @@ Session::diskstream_playlist_changed (boost::weak_ptr<Diskstream> wp) boost::shared_ptr<Playlist> playlist; if ((playlist = dstream->playlist()) != 0) { - scoped_connect (playlist->LengthChanged, boost::bind (&Session::playlist_length_changed, this)); + playlist->LengthChanged.connect (*this, boost::bind (&Session::playlist_length_changed, this)); } /* see comment in playlist_length_changed () */ @@ -1014,9 +1014,9 @@ Session::set_auto_punch_location (Location* location) punch_connections.drop_connections (); - punch_connections.add_connection (location->start_changed.connect (boost::bind (&Session::auto_punch_start_changed, this, _1))); - punch_connections.add_connection (location->end_changed.connect (boost::bind (&Session::auto_punch_end_changed, this, _1))); - punch_connections.add_connection (location->changed.connect (boost::bind (&Session::auto_punch_changed, this, _1))); + location->start_changed.connect (punch_connections, boost::bind (&Session::auto_punch_start_changed, this, _1)); + location->end_changed.connect (punch_connections, boost::bind (&Session::auto_punch_end_changed, this, _1)); + location->changed.connect (punch_connections, boost::bind (&Session::auto_punch_changed, this, _1)); location->set_auto_punch (true, this); @@ -1052,9 +1052,9 @@ Session::set_auto_loop_location (Location* location) loop_connections.drop_connections (); - loop_connections.add_connection (location->start_changed.connect (boost::bind (&Session::auto_loop_changed, this, _1))); - loop_connections.add_connection (location->end_changed.connect (boost::bind (&Session::auto_loop_changed, this, _1))); - loop_connections.add_connection (location->changed.connect (boost::bind (&Session::auto_loop_changed, this, _1))); + location->start_changed.connect (loop_connections, boost::bind (&Session::auto_loop_changed, this, _1)); + location->end_changed.connect (loop_connections, boost::bind (&Session::auto_loop_changed, this, _1)); + location->changed.connect (loop_connections, boost::bind (&Session::auto_loop_changed, this, _1)); location->set_auto_loop (true, this); @@ -1648,7 +1648,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m route_group->add (track); } - scoped_connect (track->DiskstreamChanged, boost::bind (&Session::resort_routes, this)); + track->DiskstreamChanged.connect (*this, boost::bind (&Session::resort_routes, this)); //track->set_remote_control_id (control_id); new_routes.push_back (track); @@ -1823,7 +1823,7 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod track->audio_diskstream()->non_realtime_input_change(); - scoped_connect (track->DiskstreamChanged, boost::bind (&Session::resort_routes, this)); + track->DiskstreamChanged.connect (*this, boost::bind (&Session::resort_routes, this)); track->set_remote_control_id (control_id); ++control_id; @@ -2150,12 +2150,12 @@ Session::add_routes (RouteList& new_routes, bool save) boost::weak_ptr<Route> wpr (*x); - scoped_connect ((*x)->listen_changed, boost::bind (&Session::route_listen_changed, this, _1, wpr)); - scoped_connect ((*x)->solo_changed, boost::bind (&Session::route_solo_changed, this, _1, wpr)); - scoped_connect ((*x)->mute_changed, boost::bind (&Session::route_mute_changed, this, _1)); - scoped_connect ((*x)->output()->changed, boost::bind (&Session::set_worst_io_latencies_x, this, _1, _2)); - scoped_connect ((*x)->processors_changed, boost::bind (&Session::route_processors_changed, this, _1)); - scoped_connect ((*x)->route_group_changed, boost::bind (&Session::route_group_changed, this)); + (*x)->listen_changed.connect (*this, boost::bind (&Session::route_listen_changed, this, _1, wpr)); + (*x)->solo_changed.connect (*this, boost::bind (&Session::route_solo_changed, this, _1, wpr)); + (*x)->mute_changed.connect (*this, boost::bind (&Session::route_mute_changed, this, _1)); + (*x)->output()->changed.connect (*this, boost::bind (&Session::set_worst_io_latencies_x, this, _1, _2)); + (*x)->processors_changed.connect (*this, boost::bind (&Session::route_processors_changed, this, _1)); + (*x)->route_group_changed.connect (*this, boost::bind (&Session::route_group_changed, this)); if ((*x)->is_master()) { _master_out = (*x); @@ -2295,11 +2295,11 @@ Session::add_diskstream (boost::shared_ptr<Diskstream> dstream) /* writer goes out of scope, copies ds back to main */ } - scoped_connect (dstream->PlaylistChanged, boost::bind (&Session::diskstream_playlist_changed, this, boost::weak_ptr<Diskstream> (dstream))); + dstream->PlaylistChanged.connect (*this, boost::bind (&Session::diskstream_playlist_changed, this, boost::weak_ptr<Diskstream> (dstream))); /* this will connect to future changes, and check the current length */ diskstream_playlist_changed (boost::weak_ptr<Diskstream> (dstream)); - scoped_connect (dstream->RecordEnableChanged, boost::bind (&Session::update_have_rec_enabled_diskstream, this)); + dstream->RecordEnableChanged.connect (*this, boost::bind (&Session::update_have_rec_enabled_diskstream, this)); dstream->prepare (); @@ -2813,8 +2813,8 @@ Session::add_regions (vector<boost::shared_ptr<Region> >& new_regions) } } - scoped_connect (region->StateChanged, boost::bind (&Session::region_changed, this, _1, boost::weak_ptr<Region>(region))); - scoped_connect (region->GoingAway, boost::bind (&Session::remove_region, this, boost::weak_ptr<Region>(region))); + region->StateChanged.connect (*this, boost::bind (&Session::region_changed, this, _1, boost::weak_ptr<Region>(region))); + region->GoingAway.connect (*this, boost::bind (&Session::remove_region, this, boost::weak_ptr<Region>(region))); update_region_name_map (region); } @@ -3002,7 +3002,7 @@ Session::add_source (boost::shared_ptr<Source> source) } if (result.second) { - scoped_connect (source->GoingAway, boost::bind (&Session::remove_source, this, boost::weak_ptr<Source> (source))); + source->GoingAway.connect (*this, boost::bind (&Session::remove_source, this, boost::weak_ptr<Source> (source))); set_dirty(); } @@ -3393,7 +3393,7 @@ Session::add_playlist (boost::shared_ptr<Playlist> playlist, bool unused) bool existing = playlists->add (playlist); if (!existing) { - scoped_connect (playlist->GoingAway, boost::bind (&Session::remove_playlist, this, boost::weak_ptr<Playlist>(playlist))); + playlist->GoingAway.connect (*this, boost::bind (&Session::remove_playlist, this, boost::weak_ptr<Playlist>(playlist))); } if (unused) { @@ -3567,7 +3567,7 @@ Session::graph_reordered () void Session::add_processor (Processor* processor) { - scoped_connect (processor->GoingAway, boost::bind (&Session::remove_processor, this, processor)); + processor->GoingAway.connect (*this, boost::bind (&Session::remove_processor, this, processor)); set_dirty(); } |