From 89d4b4fb9c70e6bfac33c89fe15d1106ea16e4c9 Mon Sep 17 00:00:00 2001 From: Grygorii Zharun Date: Tue, 20 May 2014 04:19:03 -0500 Subject: [PATCH] [Summary] Making existing session to reconnect tracks in it's opened [git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 461823] --- libs/ardour/session.cc | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index e768025d53..f820c1594b 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -357,20 +357,24 @@ Session::Session (AudioEngine &eng, /* Waves Tracks: fill session with tracks basing on the amount of inputs. * each available input must have corresponding track when session starts. */ - if (_is_new && ARDOUR::Profile->get_trx () ) { - uint32_t how_many (0); - - std::vector inputs; - EngineStateController::instance()->get_physical_audio_inputs(inputs); - - how_many = inputs.size(); - - list > tracks = new_audio_track (1, 1, Normal, 0, how_many, string() ); - - if (tracks.size() != how_many) { - destroy (); - throw failed_constructor (); + if (_is_new ) { + if ( ARDOUR::Profile->get_trx () ) { + uint32_t how_many (0); + + std::vector inputs; + EngineStateController::instance()->get_physical_audio_inputs(inputs); + + how_many = inputs.size(); + + list > tracks = new_audio_track (1, 1, Normal, 0, how_many, string() ); + + if (tracks.size() != how_many) { + destroy (); + throw failed_constructor (); + } } + } else { + reconnect_existing_routes(true, true); } _is_new = false;