summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-13 00:47:18 +0100
committerRobin Gareus <robin@gareus.org>2020-02-13 00:47:18 +0100
commit46a6f47362d56955c3f5cca2943029f042df1e7c (patch)
treeace7157bc0ba99f268195b589c1d04b2314cf0dd /libs/ardour/route.cc
parent260e7ad5a9349f1e73b168f5ca71da0f9a54ecdc (diff)
Address sidechain-port name uniqueness
[Re]name sidechain port directly when a plugin is added. Usually plugins are constructed without an Route (owner is unset). PluginInsert c'tor may already create a side-chain port, at the time of construction the sidechain port will be created using the port-name "toBeRenamed". Previously the plugin had to be added to a route using "add_processor", in order to set a unique name, before a new plugin with sidechain could be constructed. ProcessorBox::use_plugins() did that in the correct sequence, however there may have been cases where this didn't work, and Route::add_processors() was called directly..
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 07cc39669a..fe27ac6d48 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -894,11 +894,6 @@ Route::add_processor (boost::shared_ptr<Processor> processor, boost::shared_ptr<
processor->activate ();
}
- boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (processor);
- if (pi) {
- pi->update_sidechain_name ();
- }
-
return 0;
}
@@ -1143,6 +1138,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
}
if (pi && pi->has_sidechain ()) {
+ pi->update_sidechain_name ();
pi->sidechain_input ()->changed.connect_same_thread (*this, boost::bind (&Route::sidechain_change_handler, this, _1, _2));
}