fix SNAFU in which Stripable::rec_enable_control() was incorrectly defined as ::recenable_control()

Make Mackie support code use the Stripable to access the rec-enable control while we're here
This commit is contained in:
Paul Davis 2016-05-24 11:54:44 -04:00
parent 983a8f3f3c
commit 28afaebdc4
5 changed files with 8 additions and 8 deletions

View 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.

View 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 */

View 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:

View 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);
}

View 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