diff options
author | Danny Rawlins <monster.romster@gmail.com> | 2017-05-07 13:10:49 +1000 |
---|---|---|
committer | Danny Rawlins <monster.romster@gmail.com> | 2017-05-07 13:12:58 +1000 |
commit | 6e1bca11b8263c6543948eba2d9f23ba7518f062 (patch) | |
tree | e2f1a8336500b8feb4bc4b07cdf1f6a3170d6fcd /jack/gcc6.patch | |
parent | e2e7d6160715d547d8a3d9081008155370fe00ce (diff) | |
download | contrib-6e1bca11b8263c6543948eba2d9f23ba7518f062.tar.gz contrib-6e1bca11b8263c6543948eba2d9f23ba7518f062.tar.xz |
jack: moved source, gcc6 fixes, API fix for jack1 API compatibility.
Diffstat (limited to 'jack/gcc6.patch')
-rw-r--r-- | jack/gcc6.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/jack/gcc6.patch b/jack/gcc6.patch new file mode 100644 index 000000000..ba7778ba5 --- /dev/null +++ b/jack/gcc6.patch @@ -0,0 +1,62 @@ +From ff1ed2c4524095055140370c1008a2d9cccc5645 Mon Sep 17 00:00:00 2001 +From: Adrian Knoth <adi@drcomp.erfurt.thur.de> +Date: Sat, 11 Jun 2016 05:35:07 +0200 +Subject: [PATCH] Fix initialization in test/iodelay.cpp + +jack_latency_range_t is + +struct _jack_latency_range { + jack_nframes_t min; + jack_nframes_t max; +}; + +and jack_nframes_t is + +typedef uint32_t jack_nframes_t; + +so it's unsigned. Initialising it with -1 is invalid (at least in C++14). We cannot use {0, 0}, because latency_cb has + + jack_latency_range_t range; + range.min = range.max = 0; + if ((range.min != capture_latency.min) || (range.max != + capture_latency.max)) { + capture_latency = range; + } + +so we must not have {0, 0}, otherwise the condition would never be true. + +Using UINT32_MAX should be equivalent to the previous -1. +--- + tests/iodelay.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tests/iodelay.cpp b/tests/iodelay.cpp +index e1ba63f..1ef470f 100644 +--- a/tests/iodelay.cpp ++++ b/tests/iodelay.cpp +@@ -20,6 +20,7 @@ + + #include <stdlib.h> + #include <stdio.h> ++#include <stdint.h> + #include <math.h> + #include <unistd.h> + #include <jack/jack.h> +@@ -167,8 +168,8 @@ static jack_client_t *jack_handle; + static jack_port_t *jack_capt; + static jack_port_t *jack_play; + +-jack_latency_range_t capture_latency = {-1, -1}; +-jack_latency_range_t playback_latency = {-1, -1}; ++jack_latency_range_t capture_latency = {UINT32_MAX, UINT32_MAX}; ++jack_latency_range_t playback_latency = {UINT32_MAX, UINT32_MAX}; + + void + latency_cb (jack_latency_callback_mode_t mode, void *arg) +@@ -266,4 +267,4 @@ int main (int ac, char *av []) + return 0; + } + +-// -------------------------------------------------------------------------------- +\ No newline at end of file ++// -------------------------------------------------------------------------------- |