From 0eebc8b8948edf4ec5c038119784767d5b229a52 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 24 Sep 2019 19:48:31 +0200 Subject: Prepare for plugin-control groups This is in preparation to allow groups of "well known" controls, the parameter ID of which is not known a-priori. --- libs/ardour/control_group.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libs/ardour/control_group.cc') diff --git a/libs/ardour/control_group.cc b/libs/ardour/control_group.cc index 7a984e4e17..f3677c1af5 100644 --- a/libs/ardour/control_group.cc +++ b/libs/ardour/control_group.cc @@ -128,7 +128,14 @@ int ControlGroup::add_control (boost::shared_ptr ac) { if (ac->parameter() != _parameter) { - return -1; + if (_parameter.type () != PluginAutomation) { + return -1; + } + /* allow plugin-automation - first control sets Evoral::parameter */ + Glib::Threads::RWLock::ReaderLock lm (controls_lock); + if (!_controls.empty () && _controls.begin()->second->parameter() != ac->parameter()) { + return -1; + } } std::pair res; -- cgit v1.2.3