if (Variant::type_is_numeric(desc.datatype)) {
list = boost::shared_ptr<AutomationList>(new AutomationList(param, desc));
}
- add_control (boost::shared_ptr<AutomationControl> (new PluginPropertyControl(this, param, desc, list)));
+ boost::shared_ptr<AutomationControl> c (new PluginPropertyControl(this, param, desc, list));
+ if (!Variant::type_is_numeric(desc.datatype)) {
+ c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable));
+ }
+ add_control (c);
}
}
BypassableChanged ();
}
+bool
+PluginInsert::write_immediate_event (size_t size, const uint8_t* buf)
+{
+ bool rv = true;
+ for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
+ if (!(*i)->write_immediate_event (size, buf)) {
+ rv = false;
+ }
+ }
+ return rv;
+}
+
void
PluginInsert::preset_load_set_value (uint32_t p, float v)
{
void
PluginInsert::silence (framecnt_t nframes, framepos_t start_frame)
{
+ automation_run (start_frame, nframes); // evaluate automation only
+
if (!active ()) {
+ // XXX delaybuffers need to be offset by nframes
return;
}
/* run as normal if we are active or moving from inactive to active */
if (_session.transport_rolling() || _session.bounce_processing()) {
- automation_run (bufs, start_frame, end_frame, speed, nframes);
+ automate_and_run (bufs, start_frame, end_frame, speed, nframes);
} else {
Glib::Threads::Mutex::Lock lm (control_lock(), Glib::Threads::TRY_LOCK);
connect_and_run (bufs, start_frame, end_frame, speed, nframes, 0, lm.locked());
}
} else {
+ // XXX should call ::silence() to run plugin(s) for consistent load.
+ // We'll need to change this anyway when bypass can be automated
bypass (bufs, nframes);
+ automation_run (start_frame, nframes); // evaluate automation only
_delaybuffers.flush ();
}
}
void
-PluginInsert::automation_run (BufferSet& bufs, framepos_t start, framepos_t end, double speed, pframes_t nframes)
+PluginInsert::automate_and_run (BufferSet& bufs, framepos_t start, framepos_t end, double speed, pframes_t nframes)
{
Evoral::ControlEvent next_event (0, 0.0f);
framecnt_t offset = 0;
boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, param_id));
if (ac) {
// ToDo subtract _plugin_signal_latency from audible_frame() when rolling, assert > 0
- ac->stop_touch (true, session().audible_frame());
+ ac->stop_touch (session().audible_frame());
}
}