summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-11 03:48:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-11 03:48:14 +0000
commit0fb8c89eeb785427d2af08c49ad7b79bb5fb1330 (patch)
treec24b54fb9dd98388d49b06df33eac050948c7d93 /libs/ardour/plugin_insert.cc
parentbfd2ee48ce8e4e2061e00a1b83c6e37fa4d0ddad (diff)
fix propagation of parameter changes from Plugin to PluginInsert so that automation will record parameter changes performed in a plugin GUI (#4976)
git-svn-id: svn://localhost/ardour2/branches/3.0@13026 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc35
1 files changed, 14 insertions, 21 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 1ef32d6127..baaa632d2b 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -262,31 +262,24 @@ PluginInsert::create_automatable_parameters ()
}
void
-PluginInsert::parameter_changed (Evoral::Parameter which, float val)
+PluginInsert::parameter_changed (uint32_t which, float val)
{
- if (which.type() != PluginAutomation) {
- return;
- }
-
- cerr << "Param change: " << which << endl;
+ boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, which));
- boost::shared_ptr<AutomationControl> ac = automation_control (which);
-
if (ac) {
- cerr << "updating " << ac->name() << " to " << val << endl;
ac->set_double (val);
- }
-
- Plugins::iterator i = _plugins.begin();
-
- /* don't set the first plugin, just all the slaves */
-
- if (i != _plugins.end()) {
- ++i;
- for (; i != _plugins.end(); ++i) {
- (*i)->set_parameter (which, val);
- }
- }
+
+ Plugins::iterator i = _plugins.begin();
+
+ /* don't set the first plugin, just all the slaves */
+
+ if (i != _plugins.end()) {
+ ++i;
+ for (; i != _plugins.end(); ++i) {
+ (*i)->set_parameter (which, val);
+ }
+ }
+ }
}
int