aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAlex Chronopoulos <[email protected]>2017-10-12 12:50:17 +0300
committerMatthew Gregan <[email protected]>2017-10-13 16:17:17 +1300
commitee7c747fa16e41b2dd9f31788ca02a522dadba43 (patch)
tree6cae17a3158bbbf414b76333d5e45dbae9c65a22 /test
parent57eae3619cc020cb5d1b38813b1bbef4e2775709 (diff)
downloadcubeb-ee7c747fa16e41b2dd9f31788ca02a522dadba43.tar.gz
cubeb-ee7c747fa16e41b2dd9f31788ca02a522dadba43.zip
Mute test deadlock
Diffstat (limited to 'test')
-rw-r--r--test/test_deadlock.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_deadlock.cpp b/test/test_deadlock.cpp
index 42301ac..38a9ad6 100644
--- a/test/test_deadlock.cpp
+++ b/test/test_deadlock.cpp
@@ -104,7 +104,7 @@ void state_cb_audio(cubeb_stream * /*stream*/, void * /*user*/, cubeb_state /*st
// current used AudioUnit.
template<typename T>
long data_cb(cubeb_stream * /*stream*/, void * /*user*/,
- const void * /*inputbuffer*/, void * /*outputbuffer*/, long nframes)
+ const void * /*inputbuffer*/, void * outputbuffer, long nframes)
{
called = true;
@@ -129,6 +129,8 @@ long data_cb(cubeb_stream * /*stream*/, void * /*user*/,
char const * backend_id = cubeb_get_backend_id(get_cubeb_context());
fprintf(stderr, "[%llu] callback on %s\n", tid, backend_id);
+ // Mute the output (or get deaf)
+ memset(outputbuffer, 0, nframes * 2 * sizeof(float));
return nframes;
}
@@ -250,4 +252,6 @@ TEST(cubeb, run_deadlock_test)
ASSERT_NE(task_done.load(), killed);
ASSERT_TRUE(task_done.load());
+
+ cubeb_stream_stop(stream);
}