diff options
author | Chris Robinson <[email protected]> | 2014-12-22 19:29:55 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-12-22 19:29:55 -0800 |
commit | beb670a93966973fa9b8b9902599e37cae9139bb (patch) | |
tree | 2205152ef8df8d9e2080b23c7b35e304f03f3ad2 /Alc | |
parent | 5e189624b7010def7ba8d42bc7f9353349190d04 (diff) |
Add an option to prevent spawning a JACK server
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/backends/jack.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Alc/backends/jack.c b/Alc/backends/jack.c index 5bb2a1c3..f4d4e181 100644 --- a/Alc/backends/jack.c +++ b/Alc/backends/jack.c @@ -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); |