From 4b365931066a5e25f0aceba4bdb3d919296066b4 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Mar 2016 13:12:23 -0500 Subject: [PATCH] fix faderport and mackie to use route AutomationControls to be notified about solo/mute changes --- libs/surfaces/faderport/faderport.cc | 15 ++------------- libs/surfaces/faderport/faderport.h | 1 - libs/surfaces/mackie/strip.cc | 4 +--- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc index 5f5a1a1bcc..d08264a42d 100644 --- a/libs/surfaces/faderport/faderport.cc +++ b/libs/surfaces/faderport/faderport.cc @@ -1142,9 +1142,8 @@ FaderPort::set_current_route (boost::shared_ptr r) if (_current_route) { _current_route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::drop_current_route, this), this); - _current_route->mute_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_mute, this), this); - _current_route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_solo, this), this); - _current_route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_listen, this), this); + _current_route->mute_control()->Changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_mute, this), this); + _current_route->solo_control()->Changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_solo, this), this); boost::shared_ptr t = boost::dynamic_pointer_cast (_current_route); if (t) { @@ -1248,16 +1247,6 @@ FaderPort::map_solo () } } -void -FaderPort::map_listen () -{ - if (_current_route) { - get_button (Solo).set_led_state (_output_port, _current_route->listening_via_monitor()); - } else { - get_button (Solo).set_led_state (_output_port, false); - } -} - void FaderPort::map_recenable () { diff --git a/libs/surfaces/faderport/faderport.h b/libs/surfaces/faderport/faderport.h index 2706f912c6..10bd23e618 100644 --- a/libs/surfaces/faderport/faderport.h +++ b/libs/surfaces/faderport/faderport.h @@ -304,7 +304,6 @@ class FaderPort : public ARDOUR::ControlProtocol, public AbstractUI r, bool /*with_messages*/) _solo->set_control (_route->solo_control()); _mute->set_control (_route->mute_control()); - _route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); - _route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); - + _route->solo_control()->Changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); _route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context()); boost::shared_ptr pan_control = _route->pan_azimuth_control();