aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-11-12 03:19:23 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-11-12 03:19:23 +0000
commitb160688d388f85f01d1ee508356fe92fcfd8db78 (patch)
tree7168c40227154a88a70c591a656e8acaa486d963
parent83e1900c2d8a266a9e6bdd37e70a239542c92799 (diff)
replaced deprecated jack_client_new() call with jack_client_open() code
svn path=/trunk/externals/jackx/; revision=16538
-rw-r--r--libjackx.c17
1 files changed, 16 insertions, 1 deletions
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 <jack/jack.h>
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;
}