{
}
+Automatable::Automatable (const Automatable& other)
+ : ControlSet (other)
+ , _a_session (other._a_session)
+ , _last_automation_snapshot (0)
+{
+ Glib::Mutex::Lock lm (other._control_lock);
+
+ for (Controls::const_iterator i = other._controls.begin(); i != other._controls.end(); ++i) {
+ boost::shared_ptr<Evoral::Control> ac (control_factory (i->first));
+ _controls[ac->parameter()] = ac;
+ }
+}
int
Automatable::old_set_automation_state (const XMLNode& node)
{
ControlSet::add_control(ac);
_can_automate_list.insert(param);
auto_state_changed(param); // sync everything up
+
+ /* connect to automation_state_changed so that we can emit a signal when one of our controls'
+ automation state changes
+ */
+ boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl> (ac);
+ if (c) {
+ c->alist()->automation_state_changed.connect_same_thread (
+ _control_connections, boost::bind (&Automatable::automation_state_changed, this, c->parameter())
+ );
+ }
}
void
return boost::dynamic_pointer_cast<const AutomationControl>(Evoral::ControlSet::control(id));
}
+void
+Automatable::automation_state_changed (Evoral::Parameter const & p)
+{
+ AutomationStateChanged (p); /* EMIT SIGNAL */
+}