diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 870a068745..58c6886026 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -328,7 +328,7 @@ ARDOUR_UI::create_engine () loading_message (_("Starting audio engine")); try { - engine = new ARDOUR::AudioEngine (ARDOUR_COMMAND_LINE::jack_client_name); + engine = new ARDOUR::AudioEngine (ARDOUR_COMMAND_LINE::jack_client_name, ARDOUR_COMMAND_LINE::jack_session_uuid); } catch (...) { diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index c010f695cb..0c1240e435 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -24,6 +24,7 @@ */ #include "ardour/session.h" +#include "ardour/audioengine.h" #include "actions.h" #include "ardour_ui.h" @@ -124,6 +125,10 @@ ARDOUR_UI::set_session (Session *s) _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); +#ifdef HAVE_JACK_SESSION + engine->JackSessionEvent.connect (*_session, MISSING_INVALIDATOR, ui_bind (&Session::jack_session_event, _session, _1), gui_context()); +#endif + /* Clocks are on by default after we are connected to a session, so show that here. */ diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc index 3a0794e65a..1392cb3f48 100644 --- a/gtk2_ardour/opts.cc +++ b/gtk2_ardour/opts.cc @@ -44,6 +44,7 @@ string ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin de Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus"; bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false; string ARDOUR_COMMAND_LINE::immediate_save; +string ARDOUR_COMMAND_LINE::jack_session_uuid; using namespace ARDOUR_COMMAND_LINE; @@ -105,6 +106,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[]) { "sync", 0, 0, 'S' }, { "curvetest", 1, 0, 'C' }, { "save", 1, 0, 'E' }, + { "uuid", 1, 0, 'U' }, { 0, 0, 0, 0 } }; @@ -192,6 +194,9 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[]) immediate_save = optarg; break; + case 'U': + jack_session_uuid = optarg; + default: return print_help(execname); } diff --git a/gtk2_ardour/opts.h b/gtk2_ardour/opts.h index 826fc53880..ffb309a088 100644 --- a/gtk2_ardour/opts.h +++ b/gtk2_ardour/opts.h @@ -39,6 +39,7 @@ extern std::string keybindings_path; extern Glib::ustring menus_file; extern bool finder_invoked_ardour; extern std::string immediate_save; +extern std::string jack_session_uuid; extern int32_t parse_opts (int argc, char *argv[]);