2 #include "pbd/failed_constructor.h"
3 #include "ardour/ardour.h"
4 #include "ardour/audioengine.h"
5 #include "ardour/session.h"
6 #include "midi++/manager.h"
11 using namespace ARDOUR;
13 static const char* localedir = LOCALEDIR;
15 int main (int argc, char* argv[])
18 cerr << "Syntax: " << argv[0] << " <dir> <snapshot-name>\n";
22 ARDOUR::init (false, true, localedir);
27 s = load_session (argv[1], argv[2]);
28 } catch (failed_constructor& e) {
29 cerr << "failed_constructor: " << e.what() << "\n";
31 } catch (AudioEngine::PortRegistrationFailure& e) {
32 cerr << "PortRegistrationFailure: " << e.what() << "\n";
34 } catch (exception& e) {
35 cerr << "exception: " << e.what() << "\n";
38 cerr << "unknown exception.\n";
42 AudioEngine::instance()->remove_session ();
44 AudioEngine::instance()->stop (true);
46 MIDI::Manager::destroy ();
47 AudioEngine::destroy ();