mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
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.
This commit is contained in:
parent
23eba1cc39
commit
99fb7346f0
2 changed files with 8 additions and 0 deletions
|
|
@ -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 *);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue