diff options
Diffstat (limited to 'libs/backends/jack/jack_connection.cc')
-rw-r--r-- | libs/backends/jack/jack_connection.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/backends/jack/jack_connection.cc b/libs/backends/jack/jack_connection.cc index 7b3d35efa5..d5d25c747f 100644 --- a/libs/backends/jack/jack_connection.cc +++ b/libs/backends/jack/jack_connection.cc @@ -54,6 +54,7 @@ JackConnection::JackConnection (const std::string& arg1, const std::string& arg2 , _client_name (arg1) , session_uuid (arg2) { + _in_control = !server_running(); } JackConnection::~JackConnection () @@ -105,6 +106,19 @@ JackConnection::open () global_epa->restore (); } + /* check to see if the server is already running so that we know if we + * are starting it. + */ + + jack_client_t* c = jack_client_open ("ardourprobe", JackNoStartServer, &status); + + if (status == 0) { + _in_control = false; + jack_client_close (c); + } else { + _in_control = true; + } + /* ensure that PATH or equivalent includes likely locations of the JACK * server, in case the user's default does not. */ |