From b160688d388f85f01d1ee508356fe92fcfd8db78 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 12 Nov 2012 03:19:23 +0000 Subject: replaced deprecated jack_client_new() call with jack_client_open() code svn path=/trunk/externals/jackx/; revision=16538 --- libjackx.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libjackx.c b/libjackx.c index 05a5891..f576e83 100644 --- a/libjackx.c +++ b/libjackx.c @@ -18,6 +18,7 @@ */ +#include "m_pd.h" #include static jack_client_t *jc; @@ -25,6 +26,20 @@ static jack_client_t *jc; jack_client_t * jackx_get_jack_client() { if (!jc) - jc = jack_client_new("jacky-x"); + { + jack_status_t status; + jc = jack_client_open ("jackx-pd", JackNullOption, &status, NULL); + if (status & JackServerFailed) { + error("jackx: unable to connect to JACK server"); + jc = NULL; + } + if (status) { + if (status & JackServerStarted) { + logpost(NULL, 4, "jackx: started server"); + } else { + error("jackx: server returned status %d", status); + } + } + } return jc; } -- cgit v1.2.1