mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Prepare for removal of Advanced Session Options (BusProfile)
This commit is contained in:
parent
36c708c465
commit
b3dc75fed3
3 changed files with 4 additions and 32 deletions
|
|
@ -3285,13 +3285,7 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
|
||||||
BusProfile bus_profile;
|
BusProfile bus_profile;
|
||||||
|
|
||||||
if (nsm) {
|
if (nsm) {
|
||||||
|
|
||||||
bus_profile.master_out_channels = 2;
|
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 {
|
} else {
|
||||||
|
|
||||||
/* get settings from advanced section of NSD */
|
/* 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;
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3846,7 +3822,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
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;
|
Session *new_session;
|
||||||
int x;
|
int x;
|
||||||
|
|
@ -3863,7 +3839,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
|
||||||
_session_is_new = true;
|
_session_is_new = true;
|
||||||
|
|
||||||
try {
|
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) {
|
catch (SessionException e) {
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ public:
|
||||||
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
|
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
|
||||||
bool session_loaded;
|
bool session_loaded;
|
||||||
bool session_load_in_progress;
|
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; }
|
bool session_is_new() const { return _session_is_new; }
|
||||||
|
|
||||||
ARDOUR::Session* the_session() { return _session; }
|
ARDOUR::Session* the_session() { return _session; }
|
||||||
|
|
|
||||||
|
|
@ -221,10 +221,6 @@ static Session * _create_session (string dir, string state, uint32_t rate) // th
|
||||||
// TODO add option/bindings for this
|
// TODO add option/bindings for this
|
||||||
BusProfile bus_profile;
|
BusProfile bus_profile;
|
||||||
bus_profile.master_out_channels = 2;
|
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 ();
|
AudioEngine* engine = AudioEngine::instance ();
|
||||||
Session* session = new Session (*engine, dir, state, &bus_profile);
|
Session* session = new Session (*engine, dir, state, &bus_profile);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue