Add an option to prevent spawning a JACK server

This commit is contained in:
Chris Robinson
2014-12-22 19:29:55 -08:00
parent 5e189624b7
commit beb670a939
2 changed files with 11 additions and 2 deletions
+6 -2
View File
@@ -99,6 +99,8 @@ JACK_FUNCS(MAKE_FUNC);
#endif
static jack_options_t ClientOptions = JackNullOption;
static ALCboolean jack_load(void)
{
ALCboolean error = ALC_FALSE;
@@ -336,7 +338,7 @@ static ALCenum ALCjackPlayback_open(ALCjackPlayback *self, const ALCchar *name)
else if(strcmp(name, jackDevice) != 0)
return ALC_INVALID_VALUE;
self->Client = jack_client_open(client_name, 0, &status, NULL);
self->Client = jack_client_open(client_name, ClientOptions, &status, NULL);
if(self->Client == NULL)
{
ERR("jack_client_open() failed, status = 0x%02x\n", status);
@@ -510,7 +512,9 @@ static ALCboolean ALCjackBackendFactory_init(ALCjackBackendFactory* UNUSED(self)
if(!jack_load())
return ALC_FALSE;
client = jack_client_open("alsoft", 0, &status, NULL);
if(!GetConfigValueBool("jack", "spawn-server", 1))
ClientOptions |= JackNoStartServer;
client = jack_client_open("alsoft", ClientOptions, &status, NULL);
if(client == NULL)
{
WARN("jack_client_open() failed, 0x%02x\n", status);
+5
View File
@@ -318,6 +318,11 @@
##
[jack]
## spawn-server:
# Attempts to autospawn a JACK server whenever needed (initializing the
# backend, opening devices, etc).
#spawn-server = true
## buffer-size:
# Sets the update buffer size, in samples, that the backend will keep buffered
# to handle the server's real-time processing requests. This value must be a