add in more Tracks-related auto-(re)connect changes, all conditionalized by Profile
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 9 May 2015 00:39:39 +0000 (20:39 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:11 +0000 (14:18 -0400)
libs/ardour/session.cc
libs/ardour/session_state.cc

index b7585691c4d8bb825079f7819ac6d789c92528de..c6b15307c017d64b291c53a73541cb56a67d330b 100644 (file)
@@ -853,7 +853,13 @@ Session::auto_connect_master_bus ()
        if (!_master_out || !Config->get_auto_connect_standard_busses() || _monitor_out) {
                return;
        }
-               
+       
+       // Waves Tracks: Do not connect master bas for Tracks if AutoConnectMaster option is not set
+       // In this case it means "Multi Out" output mode
+       if (ARDOUR::Profile->get_trx() && !(Config->get_output_auto_connect() & AutoConnectMaster) ) {
+               return;
+       }
+
        /* if requested auto-connect the outputs to the first N physical ports.
         */
        
index a124f4fc12e4f389f73469e701277931e160c942..267eaa092869d8fe24ad225070ce8a5c25601da7 100644 (file)
@@ -507,10 +507,12 @@ Session::create (const string& session_template, BusProfile* bus_profile)
                                out << in.rdbuf();
                                 _is_new = false;
 
-                               /* Copy plugin state files from template to new session */
-                               std::string template_plugins = Glib::build_filename (session_template, X_("plugins"));
-                               copy_recurse (template_plugins, plugins_dir ());
-                               
+                                if (!ARDOUR::Profile->get_trx()) {
+                                       /* Copy plugin state files from template to new session */
+                                       std::string template_plugins = Glib::build_filename (session_template, X_("plugins"));
+                                       copy_recurse (template_plugins, plugins_dir ());
+                                }
+                                
                                return 0;
 
                        } else {
@@ -538,8 +540,9 @@ Session::create (const string& session_template, BusProfile* bus_profile)
                RouteList rl;
                 ChanCount count(DataType::AUDIO, bus_profile->master_out_channels);
 
-               if (bus_profile->master_out_channels) {
-                       boost::shared_ptr<Route> r (new Route (*this, _("Master"), Route::MasterOut, DataType::AUDIO));
+                // Waves Tracks: always create master bus for Tracks
+                if (ARDOUR::Profile->get_trx() || bus_profile->master_out_channels) {
+                       boost::shared_ptr<Route> r (new Route (*this, _("Master"), Route::MasterOut, DataType::AUDIO));
                         if (r->init ()) {
                                 return -1;
                         }
@@ -563,16 +566,20 @@ Session::create (const string& session_template, BusProfile* bus_profile)
                        add_routes (rl, false, false, false);
                }
 
-                /* this allows the user to override settings with an environment variable.
-                 */
-
-                if (no_auto_connect()) {
-                        bus_profile->input_ac = AutoConnectOption (0);
-                        bus_profile->output_ac = AutoConnectOption (0);
-                }
-
-                Config->set_input_auto_connect (bus_profile->input_ac);
-                Config->set_output_auto_connect (bus_profile->output_ac);
+               // Waves Tracks: Skip this. Always use autoconnection for Tracks
+               if (!ARDOUR::Profile->get_trx()) {
+                       
+                       /* this allows the user to override settings with an environment variable.
+                        */
+                       
+                       if (no_auto_connect()) {
+                               bus_profile->input_ac = AutoConnectOption (0);
+                               bus_profile->output_ac = AutoConnectOption (0);
+                       }
+                       
+                       Config->set_input_auto_connect (bus_profile->input_ac);
+                       Config->set_output_auto_connect (bus_profile->output_ac);
+               }
         }
 
        if (Config->get_use_monitor_bus() && bus_profile) {