diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index de1246074f..2bd3b198f8 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -86,8 +86,6 @@ using namespace ArdourSurface; #include "pbd/abstract_ui.inc.cc" // instantiate template -OSC* OSC::_instance = 0; - #ifdef DEBUG static void error_callback(int num, const char *m, const char *path) { @@ -129,8 +127,6 @@ OSC::OSC (Session& s, uint32_t port) , _zeroconf (0) , gui (0) { - _instance = this; - session->Exported.connect (*this, MISSING_INVALIDATOR, std::bind (&OSC::session_exported, this, _1, _2), this); } @@ -138,7 +134,6 @@ OSC::~OSC() { tick = false; stop (); - _instance = 0; } void diff --git a/libs/surfaces/osc/osc.h b/libs/surfaces/osc/osc.h index 9944d5d6da..899a0fc62e 100644 --- a/libs/surfaces/osc/osc.h +++ b/libs/surfaces/osc/osc.h @@ -80,8 +80,6 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI OSC (ARDOUR::Session&, uint32_t port); virtual ~OSC(); - static OSC* instance() { return _instance; } - XMLNode& get_state () const; int set_state (const XMLNode&, int version); @@ -767,8 +765,6 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI void debugmsg (const char *prefix, const char *path, const char* types, lo_arg **argv, int argc); - static OSC* _instance; - mutable void *gui; void build_gui (); }; diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index 1d062571ae..c317117de8 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -83,18 +83,18 @@ OSCCueObserver::refresh_strip (std::shared_ptr new_strip, Sor send_end (new_sends.size ()); _strip = new_strip; - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::clear_observer, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::clear_observer, this), &_osc); sends = new_sends; - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, 0), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, 0), &_osc); name_changed (ARDOUR::Properties::name, 0); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_change_message, this, X_("/cue/mute"), 0, std::weak_ptr(_strip->mute_control())), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_change_message, this, X_("/cue/mute"), 0, std::weak_ptr(_strip->mute_control())), &_osc); send_change_message (X_("/cue/mute"), 0, _strip->mute_control()); gain_timeout[0] = 0; _last_gain[0] = -1; // unused - _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, 0, std::weak_ptr(_strip->gain_control()), false), OSC::instance()); + _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, 0, std::weak_ptr(_strip->gain_control()), false), &_osc); send_gain_message (0, _strip->gain_control(), true); send_init (); @@ -148,13 +148,13 @@ OSCCueObserver::send_init() std::shared_ptr r = std::dynamic_pointer_cast (sends[i]); std::shared_ptr send = r->internal_send_for (std::dynamic_pointer_cast (_strip)); if (r) { - r->processors_changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_restart, this), OSC::instance()); + r->processors_changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_restart, this), &_osc); } if (send) { // send name if (r) { - sends[i]->PropertyChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, i + 1), OSC::instance()); + sends[i]->PropertyChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::name_changed, this,_1, i + 1), &_osc); name_changed (ARDOUR::Properties::name, i + 1); } @@ -162,13 +162,13 @@ OSCCueObserver::send_init() if (send->gain_control()) { gain_timeout[i + 1] = 0; _last_gain[i + 1] = -1.0; - send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, i + 1, std::weak_ptr(send->gain_control()), false), OSC::instance()); + send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, i + 1, std::weak_ptr(send->gain_control()), false), &_osc); send_gain_message (i + 1, send->gain_control(), true); } std::shared_ptr proc = std::dynamic_pointer_cast (send); std::weak_ptr wproc (proc); - proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_enabled_message, this, X_("/cue/send/enable"), i + 1, wproc), OSC::instance()); + proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_enabled_message, this, X_("/cue/send/enable"), i + 1, wproc), &_osc); send_enabled_message (X_("/cue/send/enable"), i + 1, wproc); } } diff --git a/libs/surfaces/osc/osc_global_observer.cc b/libs/surfaces/osc/osc_global_observer.cc index c832aeecd6..e827aebaa1 100644 --- a/libs/surfaces/osc/osc_global_observer.cc +++ b/libs/surfaces/osc/osc_global_observer.cc @@ -60,7 +60,7 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS if (feedback[16]) { //Mixer Scenes - MixerScene::Change.connect (session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::update_mixer_scene_state, this), OSC::instance()); + MixerScene::Change.connect (session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::update_mixer_scene_state, this), &_osc); update_mixer_scene_state(); } @@ -78,21 +78,21 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS std::shared_ptr strip = session->master_out(); std::shared_ptr mute_controllable = std::dynamic_pointer_cast(strip->mute_control()); - mute_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/mute"), strip->mute_control()), OSC::instance()); + mute_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/mute"), strip->mute_control()), &_osc); send_change_message (X_("/master/mute"), mute_controllable); std::shared_ptr trim_controllable = std::dynamic_pointer_cast(strip->trim_control()); - trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_trim_message, this, X_("/master/trimdB"), strip->trim_control()), OSC::instance()); + trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_trim_message, this, X_("/master/trimdB"), strip->trim_control()), &_osc); send_trim_message (X_("/master/trimdB"), trim_controllable); std::shared_ptr pan_controllable = std::dynamic_pointer_cast(strip->pan_azimuth_control()); if (pan_controllable) { - pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/pan_stereo_position"), strip->pan_azimuth_control()), OSC::instance()); + pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/master/pan_stereo_position"), strip->pan_azimuth_control()), &_osc); send_change_message (X_("/master/pan_stereo_position"), pan_controllable); } std::shared_ptr gain_controllable = std::dynamic_pointer_cast(strip->gain_control()); - gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/master/"), strip->gain_control()), OSC::instance()); + gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/master/"), strip->gain_control()), &_osc); send_gain_message (X_("/master/"), gain_controllable); // monitor stuff next @@ -101,45 +101,45 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS _osc.text_message (X_("/monitor/name"), "Monitor", addr); std::shared_ptr mon_mute_cont = strip->monitor_control()->cut_control(); - mon_mute_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mute"), mon_mute_cont), OSC::instance()); + mon_mute_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mute"), mon_mute_cont), &_osc); send_change_message (X_("/monitor/mute"), mon_mute_cont); std::shared_ptr mon_dim_cont = strip->monitor_control()->dim_control(); - mon_dim_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/dim"), mon_dim_cont), OSC::instance()); + mon_dim_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/dim"), mon_dim_cont), &_osc); send_change_message (X_("/monitor/dim"), mon_dim_cont); std::shared_ptr mon_mono_cont = strip->monitor_control()->mono_control(); - mon_mono_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mono"), mon_mono_cont), OSC::instance()); + mon_mono_cont->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/monitor/mono"), mon_mono_cont), &_osc); send_change_message (X_("/monitor/mono"), mon_mono_cont); gain_controllable = std::dynamic_pointer_cast(strip->gain_control()); - gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/monitor/"), strip->gain_control()), OSC::instance()); + gain_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_gain_message, this, X_("/monitor/"), strip->gain_control()), &_osc); send_gain_message (X_("/monitor/"), gain_controllable); } //Transport feedback - session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); + session->TransportStateChange.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), &_osc); send_transport_state_changed (); - session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance()); - session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_record_state_changed, this), OSC::instance()); + session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_transport_state_changed, this), &_osc); + session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_record_state_changed, this), &_osc); send_record_state_changed (); marks_changed (); // session feedback - session->StateSaved.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::session_name, this, X_("/session_name"), _1), OSC::instance()); + session->StateSaved.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::session_name, this, X_("/session_name"), _1), &_osc); session_name (X_("/session_name"), session->snap_name()); - session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::solo_active, this, _1), OSC::instance()); + session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::solo_active, this, _1), &_osc); solo_active (session->soloing() || session->listening()); if (session->click_gain()) { std::shared_ptr click_controllable = std::dynamic_pointer_cast(session->click_gain()->gain_control()); - click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), OSC::instance()); + click_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCGlobalObserver::send_change_message, this, X_("/click/level"), click_controllable), &_osc); send_change_message (X_("/click/level"), click_controllable); } - session->route_group_added.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this, _1), OSC::instance()); - session->route_group_removed.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), OSC::instance()); - session->route_groups_reordered.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), OSC::instance()); + session->route_group_added.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this, _1), &_osc); + session->route_group_removed.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), &_osc); + session->route_groups_reordered.connect (session_connections, MISSING_INVALIDATOR, std::bind (static_cast(&OSCGlobalObserver::group_changed), this), &_osc); _osc.send_group_list (addr); extra_check (); diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc index 27944b8332..700796db39 100644 --- a/libs/surfaces/osc/osc_route_observer.cc +++ b/libs/surfaces/osc/osc_route_observer.cc @@ -136,71 +136,71 @@ OSCRouteObserver::refresh_strip (std::shared_ptr new_strip, b clear_strip (); return; } - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), &_osc); as = ARDOUR::Off; if (feedback[0]) { // buttons are separate feedback - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), &_osc); name_changed (ARDOUR::Properties::name); std::shared_ptr rt = std::dynamic_pointer_cast (_strip); if (rt) { - rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::group_name, this), OSC::instance()); + rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::group_name, this), &_osc); group_name (); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::pi_changed, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::pi_changed, this, _1), &_osc); _osc.int_message_with_id (X_("/strip/hide"), ssid, _strip->is_hidden (), in_line, addr); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); - _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/mute"), _strip->mute_control()), &_osc); + _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/mute"), _strip->mute_control()), &_osc); send_automation (X_("/strip/mute"), _strip->mute_control()); send_change_message (X_("/strip/mute"), _strip->mute_control()); - _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo"), _strip->solo_control()), OSC::instance()); + _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo"), _strip->solo_control()), &_osc); send_change_message (X_("/strip/solo"), _strip->solo_control()); if (_strip->solo_isolate_control()) { - _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); + _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_iso"), _strip->solo_isolate_control()), &_osc); send_change_message (X_("/strip/solo_iso"), _strip->solo_isolate_control()); } if (_strip->solo_safe_control()) { - _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_safe"), _strip->solo_safe_control()), OSC::instance()); + _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_safe"), _strip->solo_safe_control()), &_osc); send_change_message (X_("/strip/solo_safe"), _strip->solo_safe_control()); } std::shared_ptr track = std::dynamic_pointer_cast (_strip); if (track) { - track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_monitor_status, this, track->monitoring_control()), OSC::instance()); + track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_monitor_status, this, track->monitoring_control()), &_osc); send_monitor_status (track->monitoring_control()); } std::shared_ptr rec_controllable = _strip->rec_enable_control (); if (rec_controllable) { - rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/recenable"), _strip->rec_enable_control()), OSC::instance()); + rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/recenable"), _strip->rec_enable_control()), &_osc); send_change_message (X_("/strip/recenable"), _strip->rec_enable_control()); } std::shared_ptr recsafe_controllable = _strip->rec_safe_control (); if (rec_controllable) { - recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/record_safe"), _strip->rec_safe_control()), OSC::instance()); + recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/record_safe"), _strip->rec_safe_control()), &_osc); send_change_message (X_("/strip/record_safe"), _strip->rec_safe_control()); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_select_status, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_select_status, this, _1), &_osc); send_select_status (ARDOUR::Properties::selected); } if (feedback[1]) { // level controls _gain_control = _strip->gain_control(); - _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); - _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); + _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), &_osc); + _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), &_osc); gain_automation (); std::shared_ptr trim_control = std::dynamic_pointer_cast(_strip->trim_control()); if (trim_control) { - _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/trimdB"), _strip->trim_control()), OSC::instance()); + _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/trimdB"), _strip->trim_control()), &_osc); send_automation (X_("/strip/trimdB"), _strip->trim_control()); - trim_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_trim_message, this), OSC::instance()); + trim_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_trim_message, this), &_osc); send_trim_message (); } @@ -210,7 +210,7 @@ OSCRouteObserver::refresh_strip (std::shared_ptr new_strip, b current_pan_shell = pan_sh; if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), &_osc); } panner_changed (pan_sh); } else { @@ -249,24 +249,24 @@ OSCRouteObserver::refresh_send (std::shared_ptr new_send, bool for } _send = new_send; send_clear (); - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::no_strip, this), &_osc); as = ARDOUR::Off; if (feedback[0]) { // buttons are separate feedback - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::name_changed, this,_1), &_osc); name_changed (ARDOUR::Properties::name); } if (feedback[1]) { // level controls _gain_control = _send->gain_control(); - _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), OSC::instance()); - _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance()); + _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::gain_automation, this), &_osc); + _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_gain_message, this), &_osc); gain_automation (); std::shared_ptr pan_sh = _send->panner_shell(); current_pan_shell = pan_sh; if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::panner_changed, this, current_pan_shell), &_osc); } panner_changed (pan_sh); @@ -467,8 +467,8 @@ OSCRouteObserver::panner_changed (std::shared_ptr pan_sh) if (pan_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (pan_controllable); - pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), OSC::instance()); + pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), &_osc); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_position"), current_pan_shell->panner()->pannable()->pan_azimuth_control), &_osc); send_change_message (X_("/strip/pan_stereo_position"), pan_controllable); send_automation (X_("/strip/pan_stereo_position"), pan_controllable); } else { @@ -477,8 +477,8 @@ OSCRouteObserver::panner_changed (std::shared_ptr pan_sh) std::shared_ptr width_controllable = std::dynamic_pointer_cast(pan_sh->panner()->pannable()->pan_width_control); if (width_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (width_controllable); - width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), OSC::instance()); + width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), &_osc); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCRouteObserver::send_automation, this, X_("/strip/pan_stereo_width"), current_pan_shell->panner()->pannable()->pan_width_control), &_osc); send_change_message (X_("/strip/pan_stereo_width"), width_controllable); send_automation (X_("/strip/pan_stereo_width"), width_controllable); } else { diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index a038540265..0a8b2a43b5 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -140,30 +140,30 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, return; } - _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::no_strip, this), OSC::instance()); + _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::no_strip, this), &_osc); as = ARDOUR::Off; _comp_redux = 1; nsends = s_nsends; _last_gain = -1.0; _last_trim = -1.0; - _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::name_changed, this,_1), OSC::instance()); + _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::name_changed, this,_1), &_osc); name_changed (ARDOUR::Properties::name); std::shared_ptr rt = std::dynamic_pointer_cast (_strip); if (rt) { - rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_name, this), OSC::instance()); + rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_name, this), &_osc); group_name (); - rt->comment_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comment_changed, this), OSC::instance()); + rt->comment_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comment_changed, this), &_osc); comment_changed (); - session->RouteGroupPropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_sharing, this, _1), OSC::instance()); + session->RouteGroupPropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::group_sharing, this, _1), &_osc); group_sharing (rt->route_group ()); std::shared_ptr pan_sh = rt->panner_shell(); if (pan_sh) { - pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::panner_changed, this), OSC::instance()); + pan_sh->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::panner_changed, this), &_osc); } panner_changed (); @@ -171,63 +171,63 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, group_sharing (0); } - _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::pi_changed, this, _1), OSC::instance()); + _strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::pi_changed, this, _1), &_osc); _osc.float_message (X_("/select/hide"), _strip->is_hidden (), addr); - _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); - _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/mute"), _strip->mute_control()), OSC::instance()); + _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/mute"), _strip->mute_control()), &_osc); + _strip->mute_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/mute"), _strip->mute_control()), &_osc); change_message (X_("/select/mute"), _strip->mute_control()); send_automation (X_("/select/mute"), _strip->mute_control()); - _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo"), _strip->solo_control()), OSC::instance()); + _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo"), _strip->solo_control()), &_osc); change_message (X_("/select/solo"), _strip->solo_control()); if (_strip->solo_isolate_control()) { - _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); + _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_iso"), _strip->solo_isolate_control()), &_osc); change_message (X_("/select/solo_iso"), _strip->solo_isolate_control()); } if (_strip->solo_safe_control()) { - _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_safe"), _strip->solo_safe_control()), OSC::instance()); + _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_safe"), _strip->solo_safe_control()), &_osc); change_message (X_("/select/solo_safe"), _strip->solo_safe_control()); } std::shared_ptr track = std::dynamic_pointer_cast (_strip); if (track) { - track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::monitor_status, this, track->monitoring_control()), OSC::instance()); + track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::monitor_status, this, track->monitoring_control()), &_osc); monitor_status (track->monitoring_control()); } std::shared_ptr rec_controllable = _strip->rec_enable_control (); if (rec_controllable) { - rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/recenable"), _strip->rec_enable_control()), OSC::instance()); + rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/recenable"), _strip->rec_enable_control()), &_osc); change_message (X_("/select/recenable"), _strip->rec_enable_control()); } std::shared_ptr recsafe_controllable = _strip->rec_safe_control (); if (recsafe_controllable) { - recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/record_safe"), _strip->rec_safe_control()), OSC::instance()); + recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/record_safe"), _strip->rec_safe_control()), &_osc); change_message (X_("/select/record_safe"), _strip->rec_safe_control()); } std::shared_ptr phase_controllable = _strip->phase_control (); if (phase_controllable) { - phase_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/polarity"), _strip->phase_control()), OSC::instance()); + phase_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/polarity"), _strip->phase_control()), &_osc); change_message (X_("/select/polarity"), _strip->phase_control()); } - _strip->gain_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_automation, this), OSC::instance()); - _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_message, this), OSC::instance()); + _strip->gain_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_automation, this), &_osc); + _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::gain_message, this), &_osc); gain_automation (); std::shared_ptr slv = std::dynamic_pointer_cast (_strip); - slv->AssignmentChange.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::slaved_changed, this, _1, _2), OSC::instance()); + slv->AssignmentChange.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::slaved_changed, this, _1, _2), &_osc); slaved_changed (std::shared_ptr(), false); std::shared_ptr trim_controllable = std::dynamic_pointer_cast(_strip->trim_control()); if (trim_controllable) { - trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::trim_message, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); - _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance()); + trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::trim_message, this, X_("/select/trimdB"), _strip->trim_control()), &_osc); + _strip->trim_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/trimdB"), _strip->trim_control()), &_osc); trim_message (X_("/select/trimdB"), _strip->trim_control()); send_automation (X_("/select/trimdB"), _strip->trim_control()); } @@ -237,29 +237,29 @@ OSCSelectObserver::refresh_strip (std::shared_ptr new_strip, // but... MB master send enable is different if (_strip->master_send_enable_controllable ()) { - _strip->master_send_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/master_send_enable"), _strip->master_send_enable_controllable()), OSC::instance()); + _strip->master_send_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/master_send_enable"), _strip->master_send_enable_controllable()), &_osc); enable_message (X_("/select/master_send_enable"), _strip->master_send_enable_controllable()); } // Compressor if (_strip->mapped_control (Comp_Enable)) { - _strip->mapped_control (Comp_Enable)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)), OSC::instance()); + _strip->mapped_control (Comp_Enable)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)), &_osc); enable_message (X_("/select/comp_enable"), _strip->mapped_control (Comp_Enable)); } if (_strip->mapped_control (Comp_Threshold)) { - _strip->mapped_control (Comp_Threshold)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)), OSC::instance()); + _strip->mapped_control (Comp_Threshold)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)), &_osc); change_message (X_("/select/comp_threshold"), _strip->mapped_control (Comp_Threshold)); } if (_strip->mapped_control (Comp_Mode)) { - _strip->mapped_control (Comp_Mode)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comp_mode, this), OSC::instance()); + _strip->mapped_control (Comp_Mode)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::comp_mode, this), &_osc); comp_mode (); } if (_strip->mapped_control (Comp_Makeup)) { - _strip->mapped_control (Comp_Makeup)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)), OSC::instance()); + _strip->mapped_control (Comp_Makeup)->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)), &_osc); change_message (X_("/select/comp_makeup"), _strip->mapped_control (Comp_Makeup)); } - _strip->MappedControlsChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::eq_restart, this, 0), OSC::instance ()); + _strip->MappedControlsChanged.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::eq_restart, this, 0), &_osc); renew_sends (); renew_plugin (); @@ -391,7 +391,7 @@ OSCSelectObserver::send_init() bool send_valid = false; if (_strip->send_level_controllable (s)) { - _strip->send_level_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_gain, this, c, _strip->send_level_controllable(s)), OSC::instance()); + _strip->send_level_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_gain, this, c, _strip->send_level_controllable(s)), &_osc); send_timeout.push_back (2); _last_send.push_back (20.0); send_gain (c, _strip->send_level_controllable(s)); @@ -403,7 +403,7 @@ OSCSelectObserver::send_init() } if (_strip->send_enable_controllable (s)) { - _strip->send_enable_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), c, _strip->send_enable_controllable(s)), OSC::instance()); + _strip->send_enable_controllable(s)->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), c, _strip->send_enable_controllable(s)), &_osc); enable_message_with_id (X_("/select/send_enable"), c, _strip->send_enable_controllable(s)); } else if (send_valid) { std::shared_ptr r = std::dynamic_pointer_cast (_strip); @@ -414,7 +414,7 @@ OSCSelectObserver::send_init() std::shared_ptr snd = std::dynamic_pointer_cast (r->nth_send(s)); if (snd) { std::shared_ptr proc = std::dynamic_pointer_cast (snd); - proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), c, proc), OSC::instance()); + proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), c, proc), &_osc); _osc.float_message_with_id (X_("/select/send_enable"), c, proc->enabled(), in_line, addr); } } @@ -494,7 +494,7 @@ OSCSelectObserver::plugin_init() } std::shared_ptr pip = pi->plugin(); // we have a plugin we can ask if it is activated - proc->ActiveChanged.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plug_enable, this, X_("/select/plugin/activate"), proc), OSC::instance()); + proc->ActiveChanged.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plug_enable, this, X_("/select/plugin/activate"), proc), &_osc); _osc.float_message (X_("/select/plugin/activate"), proc->enabled(), addr); bool ok = false; @@ -543,7 +543,7 @@ OSCSelectObserver::plugin_init() if (pd.integer_step && pd.upper == 1) { swtch = true; } - c->Changed.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plugin_parameter_changed, this, pid, swtch, c), OSC::instance()); + c->Changed.connect (plugin_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::plugin_parameter_changed, this, pid, swtch, c), &_osc); plugin_parameter_changed (pid, swtch, c); } } @@ -696,8 +696,8 @@ OSCSelectObserver::panner_changed () std::shared_ptr pan_controllable = std::dynamic_pointer_cast(_strip->pan_azimuth_control()); if (pan_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (pan_controllable); - pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance()); + pan_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), &_osc); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), &_osc); change_message (X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()); send_automation (X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()); } @@ -705,23 +705,23 @@ OSCSelectObserver::panner_changed () std::shared_ptr width_controllable = std::dynamic_pointer_cast(_strip->pan_width_control()); if (width_controllable) { std::shared_ptrat = std::dynamic_pointer_cast (width_controllable); - width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); - at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance()); + width_controllable->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), &_osc); + at->alist()->automation_state_changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::send_automation, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), &_osc); change_message (X_("/select/pan_stereo_width"), _strip->pan_width_control()); send_automation (X_("/select/pan_stereo_width"), _strip->pan_width_control()); } // Rest of possible pan controls... Untested because I can't find a way to get them in the GUI :) if (_strip->pan_elevation_control ()) { - _strip->pan_elevation_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_elevation_position"), _strip->pan_elevation_control()), OSC::instance()); + _strip->pan_elevation_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_elevation_position"), _strip->pan_elevation_control()), &_osc); change_message (X_("/select/pan_elevation_position"), _strip->pan_elevation_control()); } if (_strip->pan_frontback_control ()) { - _strip->pan_frontback_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_frontback_position"), _strip->pan_frontback_control()), OSC::instance()); + _strip->pan_frontback_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_frontback_position"), _strip->pan_frontback_control()), &_osc); change_message (X_("/select/pan_frontback_position"), _strip->pan_frontback_control()); } if (_strip->pan_lfe_control ()) { - _strip->pan_lfe_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_lfe_control"), _strip->pan_lfe_control()), OSC::instance()); + _strip->pan_lfe_control()->Changed.connect (pan_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_lfe_control"), _strip->pan_lfe_control()), &_osc); change_message (X_("/select/pan_lfe_control"), _strip->pan_lfe_control()); } } else { @@ -1075,37 +1075,37 @@ OSCSelectObserver::eq_init() { // HPF and enable are special case, rest are in bands if (_strip->mapped_control (HPF_Enable)) { - _strip->mapped_control (HPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)), OSC::instance()); + _strip->mapped_control (HPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)), &_osc); change_message (X_("/select/eq_hpf/enable"), _strip->mapped_control (HPF_Enable)); } if (_strip->mapped_control (LPF_Enable)) { - _strip->mapped_control (LPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)), OSC::instance()); + _strip->mapped_control (LPF_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)), &_osc); change_message (X_("/select/eq_lpf/enable"), _strip->mapped_control (LPF_Enable)); } if (_strip->mapped_control (HPF_Freq)) { - _strip->mapped_control (HPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)), OSC::instance()); + _strip->mapped_control (HPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)), &_osc); change_message (X_("/select/eq_hpf/freq"), _strip->mapped_control (HPF_Freq)); } if (_strip->mapped_control (LPF_Freq)) { - _strip->mapped_control (LPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)), OSC::instance()); + _strip->mapped_control (LPF_Freq)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)), &_osc); change_message (X_("/select/eq_lpf/freq"), _strip->mapped_control (LPF_Freq)); } if (_strip->mapped_control (HPF_Slope)) { - _strip->mapped_control (HPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)), OSC::instance()); + _strip->mapped_control (HPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)), &_osc); change_message (X_("/select/eq_hpf/slope"), _strip->mapped_control (HPF_Slope)); } if (_strip->mapped_control (LPF_Slope)) { - _strip->mapped_control (LPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)), OSC::instance()); + _strip->mapped_control (LPF_Slope)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)), &_osc); change_message (X_("/select/eq_lpf/slope"), _strip->mapped_control (LPF_Slope)); } if (_strip->mapped_control (EQ_Enable)) { - _strip->mapped_control (EQ_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)), OSC::instance()); + _strip->mapped_control (EQ_Enable)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)), &_osc); enable_message (X_("/select/eq_enable"), _strip->mapped_control(EQ_Enable)); } @@ -1122,19 +1122,19 @@ OSCSelectObserver::eq_init() _osc.text_message_with_id (X_("/select/eq_band_name"), i + 1, _strip->eq_band_name (i), in_line, addr); } if (_strip->mapped_control (EQ_BandGain, i)) { - _strip->mapped_control(EQ_BandGain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)), OSC::instance()); + _strip->mapped_control(EQ_BandGain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)), &_osc); change_message_with_id (X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)); } if (_strip->mapped_control (EQ_BandFreq, i)) { - _strip->mapped_control (EQ_BandFreq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)), OSC::instance()); + _strip->mapped_control (EQ_BandFreq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)), &_osc); change_message_with_id (X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)); } if (_strip->mapped_control (EQ_BandQ, i)) { - _strip->mapped_control (EQ_BandQ, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)), OSC::instance()); + _strip->mapped_control (EQ_BandQ, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)), &_osc); change_message_with_id (X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)); } if (_strip->mapped_control (EQ_BandShape, i)) { - _strip->mapped_control (EQ_BandShape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)), OSC::instance()); + _strip->mapped_control (EQ_BandShape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, std::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)), &_osc); change_message_with_id (X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)); } } diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index f4e9aede84..d2c1feba16 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -11,7 +11,6 @@ def build(bld): obj = bld(features = 'cxx cxxshlib') obj.source = ''' osc.cc - osc_controllable.cc osc_route_observer.cc osc_select_observer.cc osc_global_observer.cc