From dee990103a1fb607ff401ec7c56e8c241074ffb5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 15 Jul 2017 20:45:49 +0200 Subject: Consistent Automation evaluation: Rule #89: The *owner* of each automation-control is responsible to evaluate automation of automated automation-controls (and emit Changed() signals to notify the GUI and slaved controls). This can happen during run(), when the Processor evaluates automation (eg. PluginInsert does that), but needs to regardless, every cycle. Emit Changed signal for GainControl This follow the same concept as PluginInsert: The Changed signal is called on demand when evaluating automation. --- libs/ardour/automatable.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libs/ardour/automatable.cc') diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 3045e8573c..908ca18137 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -345,7 +345,7 @@ Automatable::transport_located (framepos_t now) boost::shared_ptr c = boost::dynamic_pointer_cast(li->second); if (c) { - boost::shared_ptr l + boost::shared_ptr l = boost::dynamic_pointer_cast(c->list()); if (l) { @@ -395,6 +395,19 @@ Automatable::transport_stopped (framepos_t now) } } +void +Automatable::automation_run (framepos_t start, pframes_t nframes) +{ + for (Controls::iterator li = controls().begin(); li != controls().end(); ++li) { + boost::shared_ptr c = + boost::dynamic_pointer_cast(li->second); + if (!c) { + continue; + } + c->automation_run (start, nframes); + } +} + boost::shared_ptr Automatable::control_factory(const Evoral::Parameter& param) { -- cgit v1.2.3