Improve help text and error-reporting for ardour-export

This commit is contained in:
Robin Gareus 2017-08-06 14:47:50 +02:00
parent d98b722a28
commit bc713b00c3
2 changed files with 12 additions and 3 deletions

View file

@ -123,6 +123,12 @@ static Session * _load_session (string dir, string state)
std::string v;
std::string s = Glib::build_filename (dir, state + statefile_suffix);
if (!Glib::file_test (s, Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_REGULAR)) {
std::cerr << "Cannot read session '"<< s << "'\n";
return 0;
}
if (Session::get_info_from_path (s, sr, sf, v) == 0) {
if (engine->set_sample_rate (sr)) {
std::cerr << "Cannot set session's samplerate.\n";