summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStephane Letz <letz@grame.fr>2011-03-31 21:15:42 +0200
committerStephane Letz <letz@grame.fr>2011-03-31 21:15:42 +0200
commit9ce3e4fc5224eda16c677497e070150f9af8b918 (patch)
treef104ae2a394d58d5b6097f1a5e919b02685133ad /tests
parent69b81507b3b0db36ae4b2b04d6d9a3fefb675f48 (diff)
downloadjack2-9ce3e4fc5224eda16c677497e070150f9af8b918.tar.gz
Correct test.cpp.
Diffstat (limited to 'tests')
-rw-r--r--tests/test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test.cpp b/tests/test.cpp
index 1a6e4a05..7c3f5b5e 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -972,14 +972,14 @@ int main (int argc, char *argv[])
float factor = 0.5f;
old_buffer_size = jack_get_buffer_size(client1);
- Log("Testing BufferSize change & Callback...\n--> Current buffer size : %i.\n", old_buffer_size);
+ Log("Testing BufferSize change & Callback...\n--> Current buffer size : %d.\n", old_buffer_size);
linebuf = linecount;
if (jack_set_buffer_size(client1, (jack_nframes_t)(old_buffer_size * factor)) < 0) {
printf("!!! ERROR !!! jack_set_buffer_size fails !\n");
}
jack_sleep(1 * 1000);
cur_buffer_size = jack_get_buffer_size(client1);
- if ((old_buffer_size * factor) != cur_buffer_size) {
+ if (abs((old_buffer_size * factor) - cur_buffer_size) > 5) { // Tolerance needed for dummy driver...
printf("!!! ERROR !!! Buffer size has not been changed !\n");
printf("!!! Maybe jack was compiled without the '--enable-resize' flag...\n");
} else {