Prepare for removal of Advanced Session Options (BusProfile)
authorRobin Gareus <robin@gareus.org>
Tue, 15 Aug 2017 18:36:31 +0000 (20:36 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 15 Aug 2017 22:51:20 +0000 (00:51 +0200)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
tools/luadevel/luasession.cc

index c3138134897b1c36c1beb8a573109b2f388b3e6c..3425ab1bb1821a7ca4dc1ccdfa30a9e732197419 100644 (file)
@@ -3285,13 +3285,7 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
        BusProfile bus_profile;
 
        if (nsm) {
-
                bus_profile.master_out_channels = 2;
-               bus_profile.input_ac = AutoConnectPhysical;
-               bus_profile.output_ac = AutoConnectMaster;
-               bus_profile.requested_physical_in = 0; // use all available
-               bus_profile.requested_physical_out = 0; // use all available
-
        } else {
 
                /* get settings from advanced section of NSD */
@@ -3302,27 +3296,9 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
                        bus_profile.master_out_channels = 0;
                }
 
-               if (sd.connect_inputs()) {
-                       bus_profile.input_ac = AutoConnectPhysical;
-               } else {
-                       bus_profile.input_ac = AutoConnectOption (0);
-               }
-
-               bus_profile.output_ac = AutoConnectOption (0);
-
-               if (sd.connect_outputs ()) {
-                       if (sd.connect_outs_to_master()) {
-                               bus_profile.output_ac = AutoConnectMaster;
-                       } else if (sd.connect_outs_to_physical()) {
-                               bus_profile.output_ac = AutoConnectPhysical;
-                       }
-               }
-
-               bus_profile.requested_physical_in = (uint32_t) sd.input_limit_count();
-               bus_profile.requested_physical_out = (uint32_t) sd.output_limit_count();
        }
 
-       if (build_session (session_path, session_name, bus_profile)) {
+       if (build_session (session_path, session_name, &bus_profile)) {
                return -1;
        }
 
@@ -3846,7 +3822,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
 }
 
 int
-ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, BusProfile& bus_profile)
+ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, BusProfile* bus_profile)
 {
        Session *new_session;
        int x;
@@ -3863,7 +3839,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
        _session_is_new = true;
 
        try {
-               new_session = new Session (*AudioEngine::instance(), path, snap_name, &bus_profile);
+               new_session = new Session (*AudioEngine::instance(), path, snap_name, bus_profile);
        }
 
        catch (SessionException e) {
index e85135bf40331f2df35aa6e2765b213c2335a5d1..bc63d79d807278d46b89b9a0ef2098efaafe331a 100644 (file)
@@ -187,7 +187,7 @@ public:
        int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
        bool session_loaded;
        bool session_load_in_progress;
-       int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
+       int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile*);
        bool session_is_new() const { return _session_is_new; }
 
        ARDOUR::Session* the_session() { return _session; }
index 8de36360704f9487694e9c9349734f0819cdaf19..c6977529c06ddac88276f3031419c074449d6568 100644 (file)
@@ -221,10 +221,6 @@ static Session * _create_session (string dir, string state, uint32_t rate) // th
        // TODO add option/bindings for this
        BusProfile bus_profile;
        bus_profile.master_out_channels = 2;
-       bus_profile.input_ac = AutoConnectPhysical;
-       bus_profile.output_ac = AutoConnectMaster;
-       bus_profile.requested_physical_in = 0; // use all available
-       bus_profile.requested_physical_out = 0; // use all available
 
        AudioEngine* engine = AudioEngine::instance ();
        Session* session = new Session (*engine, dir, state, &bus_profile);