fix SNAFU in which Stripable::rec_enable_control() was incorrectly defined as ::recen...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 24 May 2016 15:54:44 +0000 (11:54 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:45 +0000 (15:30 -0400)
Make Mackie support code use the Stripable to access the rec-enable control while we're here

libs/ardour/ardour/stripable.h
libs/ardour/ardour/vca.h
libs/ardour/session_state.cc
libs/surfaces/mackie/mackie_control_protocol.cc
libs/surfaces/mackie/strip.cc

index cebe91a57658f4e8de357f7c5da8b4ef7c1dabb9..0ebd1f55ada02bf976261acabefdf9adb07d9209 100644 (file)
@@ -104,7 +104,7 @@ class LIBARDOUR_API Stripable : public SessionObject {
        virtual boost::shared_ptr<GainControl> trim_control() const = 0;
 
        virtual boost::shared_ptr<MonitorControl> monitoring_control() const = 0;
-       virtual boost::shared_ptr<AutomationControl> recenable_control() const { return boost::shared_ptr<AutomationControl>(); }
+       virtual boost::shared_ptr<AutomationControl> rec_enable_control() const { return boost::shared_ptr<AutomationControl>(); }
 
        /* "well-known" controls for panning. Any or all of these may return
          * null.
index 65de6fb9efb56e018669b2056b82b3c3ad256b83..1583e453fc8a4593d9d6d6fde68a3f8b5e69eadc 100644 (file)
@@ -104,7 +104,7 @@ class LIBARDOUR_API VCA : public Stripable,
        virtual boost::shared_ptr<GainControl> gain_control() const { return _gain_control; }
        virtual boost::shared_ptr<SoloControl> solo_control() const { return _solo_control; }
        virtual boost::shared_ptr<MuteControl> mute_control() const { return _mute_control; }
-       virtual boost::shared_ptr<AutomationControl> recenable_control() const { return _recenable_control; }
+       virtual boost::shared_ptr<AutomationControl> rec_enable_control() const { return _recenable_control; }
        virtual boost::shared_ptr<MonitorControl>    monitoring_control() const { return _monitor_control; }
 
        /* null Stripable API, because VCAs don't have any of this */
index 55258a3ead30c07a98d8d0c89706ded0ff8b1c5b..54cb87b82f83af809c662f6636fe1b02383d06ba 100644 (file)
@@ -3464,7 +3464,7 @@ Session::controllable_by_descriptor (const ControllableDescriptor& desc)
                break;
 
        case ControllableDescriptor::Recenable:
-               c = s->recenable_control ();
+               c = s->rec_enable_control ();
                break;
 
        case ControllableDescriptor::PanDirection:
index 4ff195d40c9173686b60e77dfa90a15897be4dee..f7c76e89db4bc3ab090a8f3208d3394061da1be2 100644 (file)
@@ -2197,7 +2197,7 @@ MackieControlProtocol::down_controls (AutomationType p)
                break;
        case RecEnableAutomation:
                for (StripableList::iterator s = stripables.begin(); s != stripables.end(); ++s) {
-                       boost::shared_ptr<AutomationControl> ac = (*s)->recenable_control();
+                       boost::shared_ptr<AutomationControl> ac = (*s)->rec_enable_control();
                        if (ac) {
                                controls.push_back (ac);
                        }
index 4fdebb38d705d74456c2d8b3d04ca8f448048d3b..d60f4955b985e5d29aa9d4a96a6e1478d8fe147c 100644 (file)
@@ -215,11 +215,11 @@ Strip::set_stripable (boost::shared_ptr<Stripable> r, bool /*with_messages*/)
        _stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context());
        _stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
 
-       boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_stripable);
+       boost::shared_ptr<AutomationControl> rec_enable_control = _stripable->rec_enable_control ();
 
-       if (trk) {
-               _recenable->set_control (trk->rec_enable_control());
-               trk->rec_enable_control()->Changed .connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
+       if (rec_enable_control) {
+               _recenable->set_control (rec_enable_control);
+               rec_enable_control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
        }
 
        // TODO this works when a currently-banked stripable is made inactive, but not