summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-10-23 01:21:42 +0200
committerRobin Gareus <robin@gareus.org>2019-10-23 01:36:33 +0200
commit7060ba4c1dc732fb95e9fa4ac60bbc1c26e15469 (patch)
treeda1d1c014fd1a87349974dee328dc446ae167a0f /libs/ardour/route.cc
parent496e6f2a4c5eaed7cf0e5cbed16ff63f53032462 (diff)
Fix strict-i/o override on session-load (amend 31847f88ef)
Plugins may override strict-i/o, and in order to know do this the plugin needs to be instantiate first.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index f897884384..19c8718d18 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3081,11 +3081,6 @@ Route::set_processor_state (XMLNode const & node, XMLProperty const* prop, Proce
} else {
processor.reset (new PluginInsert (_session));
processor->set_owner (this);
- if (_strict_io) {
- boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert>(processor);
- pi->set_strict_io (true);
- }
-
}
} else if (prop->value() == "port") {
@@ -3108,8 +3103,14 @@ Route::set_processor_state (XMLNode const & node, XMLProperty const* prop, Proce
processor.reset (new UnknownProcessor (_session, node));
}
- /* subscribe to Sidechain IO changes */
+ /* set strict I/O only after loading plugin state, because
+ * individual plugins may override this */
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (processor);
+ if (pi && _strict_io) {
+ pi->set_strict_io (true);
+ }
+
+ /* subscribe to Sidechain IO changes */
if (pi && pi->has_sidechain ()) {
pi->sidechain_input ()->changed.connect_same_thread (*this, boost::bind (&Route::sidechain_change_handler, this, _1, _2));
}