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.
This commit is contained in:
Robin Gareus
2019-09-24 19:48:31 +02:00
parent 0090a09275
commit 0eebc8b894

View File

@@ -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;