0
0
Fork 0
haikuports/media-sound/jack2/patches/jack2-1.9.10~git.patchset

53 lines
1.9 KiB
Plaintext

From dc2f59765d9c5fcb98e9c001d987df29602b1e45 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 14 Sep 2018 11:06:05 +0200
Subject: gcc7 patch pulled from upstream original jack2
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
+// --------------------------------------------------------------------------------
diff --git a/tests/test.cpp b/tests/test.cpp
index 750d152..91ef651 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -480,7 +480,7 @@ int process4(jack_nframes_t nframes, void *arg)
jack_nframes_t delta_time = cur_time - last_time;
Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
- if (delta_time > 0 && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
+ if (delta_time > 0 && abs((int64_t)delta_time - (int64_t)cur_buffer_size) > (int64_t)tolerance) {
printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
}
--
2.19.0