From a43c096a4f954cb7290189542d5e232dbac2d1cf Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 3 Jan 2021 08:04:25 +0100 Subject: Fix jack_client_new() deprecation warning By inlining its current implementation in libjack: https://github.com/jackaudio/jack1/blob/2e78fb6c883286287ae514ff0d262a5584ecdd35/libjack/client.c#L1429 The end-result should be that that the behavior of the app remains the same as before. --- src/rmd_jack.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rmd_jack.c b/src/rmd_jack.c index e1a5a0e..13239bb 100644 --- a/src/rmd_jack.c +++ b/src/rmd_jack.c @@ -146,7 +146,13 @@ int rmdStartJackClient(JackData *jdata) snprintf( pidbuf, 8, "%d", pid ); strcat(rmd_client_name, pidbuf); - if ((jdata->client = jack_client_new(rmd_client_name)) == 0) { + jack_options_t options = JackUseExactName; + + if (getenv ("JACK_START_SERVER") == NULL) { + options |= JackNoStartServer; + } + + if ((jdata->client = jack_client_open(rmd_client_name, options, NULL)) == 0) { fprintf(stderr, "Could not create new client!\n" "Make sure that Jack server is running!\n"); return 15; -- cgit v1.2.3