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:
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) {
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)
{
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)
{
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));