summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-08-03 00:50:09 +0200
committerRobin Gareus <robin@gareus.org>2013-08-03 00:51:08 +0200
commit99fb7346f07be28f548855b3e9c1ff2a174d994f (patch)
treef15fb3e6f5c643b881ce3ff1df1251c570d40a4b /libs/ardour/route.cc
parent23eba1cc392aa5b583ddb4229a227557a88ef1cd (diff)
on session-load: skip output-change-handler until IOs are restored
fixes loading a session with tracks that have more input-ports than output-ports. the problem: input -ports are added first, when added, IO::ensure_port() emits IOChange::ConfigurationChanged which in turn triggers the route to allocate corresponding output ports. Due to this callback the output-ports were created before the actual output-port-configuration and plugin-configuration from the session-state was parsed and set.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 125bcf12d6..77e538cfe9 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -98,6 +98,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type)
, _default_type (default_type)
, _remote_control_id (0)
, _in_configure_processors (false)
+ , _initial_io_setup (false)
, _custom_meter_position_noted (false)
, _last_custom_meter_was_at_end (false)
{
@@ -2011,6 +2012,7 @@ Route::set_state (const XMLNode& node, int version)
}
set_id (node);
+ _initial_io_setup = true;
if ((prop = node.property (X_("flags"))) != 0) {
_flags = Flag (string_2_enum (prop->value(), _flags));
@@ -2078,6 +2080,8 @@ Route::set_state (const XMLNode& node, int version)
_meter_type = MeterType (string_2_enum (prop->value (), _meter_type));
}
+ _initial_io_setup = false;
+
set_processor_state (processor_state);
// this looks up the internal instrument in processors
@@ -2958,6 +2962,9 @@ void
Route::output_change_handler (IOChange change, void * /*src*/)
{
bool need_to_queue_solo_change = true;
+ if (_initial_io_setup) {
+ return;
+ }
if ((change.type & IOChange::ConfigurationChanged)) {
/* This is called with the process lock held if change