Commit a450cdcc authored by Cédric Schieli's avatar Cédric Schieli
Browse files

Allow skipping of audio reservation API

Setting the JACK_NO_AUDIO_RESERVATION environment variable let one skip the
audio reservation bits.
The main use case is a system-wide jackd promiscuous instance launched at boot
time. In such a case no session bus is available, and reservation doesn't
really makes sense anyway.
parent 55219a48
......@@ -38,6 +38,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#endif
#if defined(JACK_DBUS) && defined(__linux__)
#include <stdlib.h>
#include <dbus/dbus.h>
#include "audio_reserve.h"
#endif
......@@ -304,7 +305,10 @@ int main(int argc, char** argv)
copyright(stdout);
#if defined(JACK_DBUS) && defined(__linux__)
server_ctl = jackctl_server_create(audio_acquire, audio_release);
if (getenv("JACK_NO_AUDIO_RESERVATION"))
server_ctl = jackctl_server_create(NULL, NULL);
else
server_ctl = jackctl_server_create(audio_acquire, audio_release);
#else
server_ctl = jackctl_server_create(NULL, NULL);
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment