jack: add PIPEWIRE_NOJACK to disable jack connections

This commit is contained in:
Wim Taymans 2018-12-11 16:36:36 +01:00
parent 33edb4ccd1
commit 4cb36762b0

View file

@ -1626,6 +1626,9 @@ jack_client_t * jack_client_open (const char *client_name,
const char *str; const char *str;
int i; int i;
if (getenv("PIPEWIRE_NOJACK") != NULL)
goto disabled;
pw_log_debug("client open %s %d", client_name, options); pw_log_debug("client open %s %d", client_name, options);
client = calloc(1, sizeof(struct client)); client = calloc(1, sizeof(struct client));
@ -1751,6 +1754,10 @@ jack_client_t * jack_client_open (const char *client_name,
exit: exit:
pw_thread_loop_unlock(client->context.loop); pw_thread_loop_unlock(client->context.loop);
return NULL; return NULL;
disabled:
if (status)
*status = JackFailure | JackServerFailed;
return NULL;
} }
jack_client_t * jack_client_new (const char *client_name) jack_client_t * jack_client_new (const char *client_name)