summaryrefslogtreecommitdiff
path: root/libs/ardour/control_group.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-24 19:48:31 +0200
committerRobin Gareus <robin@gareus.org>2019-09-24 19:50:54 +0200
commit0eebc8b8948edf4ec5c038119784767d5b229a52 (patch)
tree15b8d9a5f13f346eea52810e4a06664b69fb9633 /libs/ardour/control_group.cc
parent0090a09275b7861b001fdbd1004291ca4c38bf9b (diff)
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.
Diffstat (limited to 'libs/ardour/control_group.cc')
-rw-r--r--libs/ardour/control_group.cc9
1 files changed, 8 insertions, 1 deletions
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<AutomationControl> 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<ControlMap::iterator,bool> res;