diff options
author | Robin Gareus <robin@gareus.org> | 2013-08-03 00:50:09 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-08-03 00:51:08 +0200 |
commit | 99fb7346f07be28f548855b3e9c1ff2a174d994f (patch) | |
tree | f15fb3e6f5c643b881ce3ff1df1251c570d40a4b /libs | |
parent | 23eba1cc392aa5b583ddb4229a227557a88ef1cd (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')
-rw-r--r-- | libs/ardour/ardour/route.h | 1 | ||||
-rw-r--r-- | libs/ardour/route.cc | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index f0987fa77e..23f24cb275 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -557,6 +557,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, bool output_port_count_changing (ChanCount); bool _in_configure_processors; + bool _initial_io_setup; int configure_processors_unlocked (ProcessorStreams*); std::list<std::pair<ChanCount, ChanCount> > try_configure_processors (ChanCount, ProcessorStreams *); 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 |