an automation control that has to do things before its value is set in an RT context should potentially tell its ControlGroup
This fixes record-enable controls in a group failing generate a call to the required stuff for tracks (moving meter position, preparing diskstream) #7213
This commit is contained in:
parent
234ea15499
commit
bbbb874c03
@ -140,6 +140,9 @@ class LIBARDOUR_API AutomationControl
|
||||
change for execution in a realtime context. C++ access control sucks.
|
||||
*/
|
||||
friend class Session;
|
||||
/* this is what the session invokes */
|
||||
void pre_realtime_queue_stuff (double new_value, PBD::Controllable::GroupControlDisposition);
|
||||
/* this will be invoked in turn on behalf of the group or the control by itself */
|
||||
virtual void do_pre_realtime_queue_stuff (double new_value) {}
|
||||
|
||||
private:
|
||||
|
@ -63,6 +63,7 @@ class LIBARDOUR_API ControlGroup : public boost::enable_shared_from_this<Control
|
||||
Evoral::Parameter parameter() const { return _parameter; }
|
||||
|
||||
virtual void set_group_value (boost::shared_ptr<AutomationControl>, double val);
|
||||
virtual void pre_realtime_queue_stuff (double val);
|
||||
|
||||
bool use_me (PBD::Controllable::GroupControlDisposition gcd) const {
|
||||
switch (gcd) {
|
||||
|
@ -85,6 +85,16 @@ AutomationControl::get_value() const
|
||||
return Control::get_double (from_list, _session.transport_frame());
|
||||
}
|
||||
|
||||
void
|
||||
AutomationControl::pre_realtime_queue_stuff (double val, PBD::Controllable::GroupControlDisposition gcd)
|
||||
{
|
||||
if (_group && _group->use_me (gcd)) {
|
||||
_group->pre_realtime_queue_stuff (val);
|
||||
} else {
|
||||
do_pre_realtime_queue_stuff (val);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationControl::set_value (double val, PBD::Controllable::GroupControlDisposition gcd)
|
||||
{
|
||||
|
@ -152,6 +152,16 @@ ControlGroup::add_control (boost::shared_ptr<AutomationControl> ac)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ControlGroup::pre_realtime_queue_stuff (double val)
|
||||
{
|
||||
Glib::Threads::RWLock::ReaderLock lm (controls_lock);
|
||||
|
||||
for (ControlMap::iterator c = _controls.begin(); c != _controls.end(); ++c) {
|
||||
c->second->do_pre_realtime_queue_stuff (val);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ControlGroup::set_group_value (boost::shared_ptr<AutomationControl> control, double val)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ Session::set_controls (boost::shared_ptr<ControlList> cl, double val, Controllab
|
||||
|
||||
for (ControlList::iterator ci = cl->begin(); ci != cl->end(); ++ci) {
|
||||
/* as of july 2017 this is a no-op for everything except record enable */
|
||||
(*ci)->do_pre_realtime_queue_stuff (val);
|
||||
(*ci)->pre_realtime_queue_stuff (val, gcd);
|
||||
}
|
||||
|
||||
queue_event (get_rt_event (cl, val, gcd));
|
||||
|
Loading…
Reference in New Issue
Block a user