[Summary] Do not restore routes connection using XML IO state for TracksLive, because...
authorGZharun <grygoriiz@wavesglobal.com>
Mon, 23 Mar 2015 11:51:45 +0000 (13:51 +0200)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:12 +0000 (14:18 -0400)
Moreover if the device is changed XML state of IO contains port names of  the old device which causes attempts to connect to non existent ports.
[Reviewed by] Paul Davis

libs/ardour/io.cc

index 69f7c9053ee4c6ffe6db10f10d32435709584eb6..b72c29aae15d15e4d852d41a535aafb6722dccd2 100644 (file)
@@ -39,6 +39,7 @@
 #include "ardour/debug.h"
 #include "ardour/io.h"
 #include "ardour/port.h"
+#include "ardour/profile.h"
 #include "ardour/route.h"
 #include "ardour/session.h"
 #include "ardour/user_bundle.h"
@@ -692,13 +693,16 @@ IO::set_state_2X (const XMLNode& node, int version, bool in)
 int
 IO::connecting_became_legal ()
 {
-       int ret;
+       int ret = 0;
 
        assert (pending_state_node);
 
        connection_legal_c.disconnect ();
 
-       ret = make_connections (*pending_state_node, pending_state_node_version, pending_state_node_in);
+    // it's not required for TracksLive, as long as TracksLive's session does all the cennections when it's being loaded
+    if (!Profile->get_trx() ) {
+        ret = make_connections (*pending_state_node, pending_state_node_version, pending_state_node_in);
+    }
 
        delete pending_state_node;
        pending_state_node = 0;