From 7060ba4c1dc732fb95e9fa4ac60bbc1c26e15469 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 23 Oct 2019 01:21:42 +0200 Subject: 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. --- libs/ardour/route.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libs/ardour/route.cc') 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 pi = boost::dynamic_pointer_cast(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 pi = boost::dynamic_pointer_cast (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)); } -- cgit v1.2.3