boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, which));
if (ac) {
- ac->set_double (val);
+ ac->set_value (val);
Plugins::iterator i = _plugins.begin();
framepos_t end = now + nframes;
framecnt_t offset = 0;
- Glib::Mutex::Lock lm (control_lock(), Glib::TRY_LOCK);
+ Glib::Threads::Mutex::Lock lm (control_lock(), Glib::Threads::TRY_LOCK);
if (!lm.locked()) {
connect_and_run (bufs, nframes, offset, false);
plugin->set_insert_info (this);
if (_plugins.empty()) {
+ /* first (and probably only) plugin instance - connect to relevant signals
+ */
+
plugin->ParameterChanged.connect_same_thread (*this, boost::bind (&PluginInsert::parameter_changed, this, _1, _2));
+ plugin->StartTouch.connect_same_thread (*this, boost::bind (&PluginInsert::start_touch, this, _1));
+ plugin->EndTouch.connect_same_thread (*this, boost::bind (&PluginInsert::end_touch, this, _1));
}
_plugins.push_back (plugin);
(*i)->monitoring_changed ();
}
}
+
+void
+PluginInsert::start_touch (uint32_t param_id)
+{
+ boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, param_id));
+ if (ac) {
+ ac->start_touch (session().audible_frame());
+ }
+}
+
+void
+PluginInsert::end_touch (uint32_t param_id)
+{
+ boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, param_id));
+ if (ac) {
+ ac->stop_touch (true, session().audible_frame());
+ }
+}