fix faderport and mackie to use route AutomationControls to be notified about solo...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 9 Mar 2016 18:12:23 +0000 (13:12 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:40 +0000 (15:30 -0400)
libs/surfaces/faderport/faderport.cc
libs/surfaces/faderport/faderport.h
libs/surfaces/mackie/strip.cc

index 5f5a1a1bcc36e1ef8521666a7ce3c14226fe1e53..d08264a42d007c9314a8e0551773e730669d9f85 100644 (file)
@@ -1142,9 +1142,8 @@ FaderPort::set_current_route (boost::shared_ptr<Route> 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<Track> t = boost::dynamic_pointer_cast<Track> (_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 ()
 {
index 2706f912c6c67be2988543d6875eb50efe6479b2..10bd23e618ce697f860ae5e40b4882342795be7d 100644 (file)
@@ -304,7 +304,6 @@ class FaderPort : public ARDOUR::ControlProtocol, public AbstractUI<FaderPortReq
 
        void map_route_state ();
        void map_solo ();
-       void map_listen ();
        void map_mute ();
        bool rec_enable_state;
        void map_recenable ();
index fa36ee46b0969877a6cdcf269b07c2039ebafd70..caa3a3bc6620e629d7f8f2fb6a882ef2c5d4a0dc 100644 (file)
@@ -196,9 +196,7 @@ Strip::set_route (boost::shared_ptr<Route> 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<AutomationControl> pan_control = _route->pan_azimuth_control();