aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/backends/jack.c8
-rw-r--r--alsoftrc.sample5
2 files changed, 11 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);
diff --git a/alsoftrc.sample b/alsoftrc.sample
index 86d214bd..53731644 100644
--- a/alsoftrc.sample
+++ b/alsoftrc.sample
@@ -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