mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
only subdivide plugin-cycle when automation is playing
PluginInsert::automation_run() subdivides plugin-run on every control-port automation event (without splitting the process cycle). libevoral has no automation-control context, hence this function must be implemented by Automatable.
This commit is contained in:
parent
5fd4ee3ef1
commit
96b45d4909
5 changed files with 43 additions and 33 deletions
|
|
@ -87,38 +87,6 @@ ControlSet::control (const Parameter& parameter, bool create_if_missing)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ControlSet::find_next_event (double now, double end, ControlEvent& next_event) const
|
||||
{
|
||||
Controls::const_iterator li;
|
||||
|
||||
next_event.when = std::numeric_limits<double>::max();
|
||||
|
||||
for (li = _controls.begin(); li != _controls.end(); ++li) {
|
||||
ControlList::const_iterator i;
|
||||
boost::shared_ptr<const ControlList> alist (li->second->list());
|
||||
ControlEvent cp (now, 0.0f);
|
||||
if (!alist) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = lower_bound (alist->begin(), alist->end(), &cp, ControlList::time_comparator);
|
||||
i != alist->end() && (*i)->when < end; ++i) {
|
||||
if ((*i)->when > now) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i != alist->end() && (*i)->when < end) {
|
||||
if ((*i)->when < next_event.when) {
|
||||
next_event.when = (*i)->when;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return next_event.when != std::numeric_limits<double>::max();
|
||||
}
|
||||
|
||||
void
|
||||
ControlSet::clear_controls ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue