2 #include "pbd/failed_constructor.h"
3 #include "ardour/ardour.h"
4 #include "ardour/audioengine.h"
5 #include "ardour/session.h"
10 using namespace ARDOUR;
12 static const char* localedir = LOCALEDIR;
14 int main (int argc, char* argv[])
17 cerr << "Syntax: " << argv[0] << " <dir> <snapshot-name>\n";
21 ARDOUR::init (false, true, localedir);
26 s = load_session (argv[1], argv[2]);
27 } catch (failed_constructor& e) {
28 cerr << "failed_constructor: " << e.what() << "\n";
30 } catch (AudioEngine::PortRegistrationFailure& e) {
31 cerr << "PortRegistrationFailure: " << e.what() << "\n";
33 } catch (exception& e) {
34 cerr << "exception: " << e.what() << "\n";
37 cerr << "unknown exception.\n";
41 AudioEngine::instance()->remove_session ();
43 AudioEngine::instance()->stop ();
45 AudioEngine::destroy ();