mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
update session-utils
* use target name in help text * add options and documentation to copy-mixer
This commit is contained in:
parent
360f87b217
commit
f43ccd7321
5 changed files with 128 additions and 39 deletions
|
|
@ -125,18 +125,18 @@ static Session * _load_session (string dir, string state)
|
|||
if (Session::get_info_from_path (s, sr, sf) == 0) {
|
||||
if (engine->set_sample_rate (sr)) {
|
||||
std::cerr << "Cannot set session's samplerate.\n";
|
||||
::exit (EXIT_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Cannot get samplerate from session.\n";
|
||||
::exit (EXIT_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
init_post_engine ();
|
||||
|
||||
if (engine->start () != 0) {
|
||||
std::cerr << "Cannot start Audio/MIDI engine\n";
|
||||
::exit (EXIT_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Session* session = new Session (*engine, dir, state);
|
||||
|
|
@ -145,7 +145,7 @@ static Session * _load_session (string dir, string state)
|
|||
}
|
||||
|
||||
Session *
|
||||
SessionUtils::load_session (string dir, string state)
|
||||
SessionUtils::load_session (string dir, string state, bool exit_at_failure)
|
||||
{
|
||||
Session* s = 0;
|
||||
try {
|
||||
|
|
@ -163,6 +163,9 @@ SessionUtils::load_session (string dir, string state)
|
|||
cerr << "unknown exception.\n";
|
||||
::exit (EXIT_FAILURE);
|
||||
}
|
||||
if (!s && exit_at_failure) {
|
||||
::exit (EXIT_FAILURE);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue