From eaad70207ae21592ffea325b183fb7b4c62f00ba Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jan 2014 13:05:22 -0500 Subject: [PATCH 1/6] Allow users to bypass existing Jack check. --- configure.ac | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b5f351f..e0ef438 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,11 @@ dnl dnl Check for existing JACK installs dnl +AC_ARG_ENABLE(force-install, + AC_HELP_STRING([--enable-force-install], + [force installation when another Jack is found]), + [FORCE_INSTALL=$enableval]) + AC_MSG_CHECKING([existing, conflicting JACK installs]) not_overwriting=0 installs= @@ -22,7 +27,7 @@ for dir in /usr/lib /usr/local/lib /opt/lib ; do fi done -if test $not_overwriting -gt 0 ; then +if test "x$FORCE_INSTALL" != "xyes" -a $not_overwriting -gt 0 ; then echo echo echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" @@ -37,15 +42,17 @@ if test $not_overwriting -gt 0 ; then echo "Before building, you should first remove the existing JACK" echo "installation(s). " echo - echo "Alternatively use ./configure --prefix=... to force overwriting" - echo "the existing install." + echo "Alternatively use ./configure --enable-force-install to force" + echo "overwriting the existing install." echo echo "WARNING: ON ANY DEBIAN-DERIVED DISTRIBUTION (Debian, Ubuntu etc)" echo "CHANGING THE INSTALLATION PREFIX WILL NOT PRODUCE A WORKING JACK" echo "INSTALL. Please contact the distribution packager for JACK and" echo "ask them to fix their packaging." echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - exit 1 + if test "x$FORCE_INSTALL" != "xyes"; then + exit 1 + fi fi AC_CONFIG_AUX_DIR(config) From 56110c3312fdb4220b2839ce17b65b426d06b91e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jan 2014 13:11:30 -0500 Subject: [PATCH 2/6] Register HAVE_ZITA_ALSA_PCMI as automake conditional. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index e0ef438..9e61b3a 100644 --- a/configure.ac +++ b/configure.ac @@ -729,6 +729,7 @@ case $build_os in ) ;; esac +AM_CONDITIONAL(HAVE_ZITA_ALSA_PCMI, $HAVE_ZITA_ALSA_PCMI) # Celt low-latency audio codec. netjack transmission via internet. HAVE_CELT=false From 4bdf41667c2456f8e95e14f815c551f03c01e9a2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jan 2014 13:19:08 -0500 Subject: [PATCH 3/6] Switch to forked submodules. --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index b805b45..e3c7982 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "jack"] path = jack - url = git://github.com/jackaudio/headers.git + url = git@github.com:drobilla/headers.git [submodule "tools"] path = tools - url = git://github.com/jackaudio/tools.git + url = git@github.com:drobilla/tools.git [submodule "example-clients"] path = example-clients url = git://github.com/jackaudio/example-clients.git From 071e2452af9c505882c620ea3c609d6231c4f069 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 15 Nov 2014 00:24:45 -0500 Subject: [PATCH 4/6] Add --midi-bufsize to help message. This should really be generated automatically from the options list to prevent this from happening in the future. --- jackd/jackd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/jackd/jackd.c b/jackd/jackd.c index b070cbe..64d4a3d 100644 --- a/jackd/jackd.c +++ b/jackd/jackd.c @@ -500,6 +500,7 @@ static void usage (FILE *file) " [ --silent OR -s ]\n" " [ --version OR -V ]\n" " [ --nozombies OR -Z ]\n" +" [ --midi-bufsize OR -M midi-buffer-size-in-events ]\n" " -d backend [ ... backend args ... ]\n" #ifdef __APPLE__ " Available backends may include: coreaudio, dummy, net, portaudio.\n\n" From 0006f4a198776fd89840768f28550af810099c0e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Nov 2015 13:03:25 -0500 Subject: [PATCH 5/6] Set driver port order metadata This allows clients to deterministically show ports in the correct order when there are more than 9 ports (where the lack of leading zeros breaks sorting by name). --- jackd/engine.c | 11 +++++++++++ libjack/client.c | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/jackd/engine.c b/jackd/engine.c index 26df2bd..8713ebf 100644 --- a/jackd/engine.c +++ b/jackd/engine.c @@ -4472,6 +4472,17 @@ next: req->x.port_info.port_id = port_id; + if (internal) { + /* set port order so clients can list ports in the proper order if + * there are more than 9 driver ports (since the lack of leading zeros + * breaks sorting by name) */ + char index_str[16]; + snprintf (index_str, sizeof(index_str), "%d", port_id); + jack_set_property (client, shared->uuid, + "http://jackaudio.org/metadata/order", index_str, + "http://www.w3.org/2001/XMLSchema#integer"); + } + return 0; } diff --git a/libjack/client.c b/libjack/client.c index f00dee9..9535d1d 100644 --- a/libjack/client.c +++ b/libjack/client.c @@ -295,10 +295,15 @@ jack_client_deliver_request (const jack_client_t *client, jack_request_t *req) { /* indirect through the function pointer that was set either * by jack_client_open() or by jack_new_client_request() in - * the server. + * the server. possibly NULL during driver port registration, + * in which case we don't care about request delivery. */ - return client->deliver_request (client->deliver_arg, req); + if (client->deliver_request) { + return client->deliver_request (client->deliver_arg, req); + } + + return 0; } #if JACK_USE_MACH_THREADS From 969223021ec2cb7d60b57a43be3a6b6e34b60b2b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Nov 2015 15:33:57 -0500 Subject: [PATCH 6/6] Fix uninitialized values in jack_client_t --- libjack/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libjack/client.c b/libjack/client.c index 9535d1d..e3969fd 100644 --- a/libjack/client.c +++ b/libjack/client.c @@ -313,7 +313,7 @@ jack_client_alloc () { jack_client_t *client; - if ((client = (jack_client_t *) malloc (sizeof (jack_client_t))) == NULL) { + if ((client = (jack_client_t *) calloc (1, sizeof (jack_client_t))) == NULL) { return NULL; } @@ -353,7 +353,7 @@ jack_client_alloc () { jack_client_t *client; - if ((client = (jack_client_t *) malloc (sizeof (jack_client_t))) == NULL) { + if ((client = (jack_client_t *) calloc (1, sizeof (jack_client_t))) == NULL) { return NULL; } if ((client->pollfd = (struct pollfd *) malloc (sizeof (struct pollfd) * 2)) == NULL) {