diff options
author | Alex Chronopoulos <[email protected]> | 2016-01-20 20:17:11 +0200 |
---|---|---|
committer | Alex Chronopoulos <[email protected]> | 2016-01-20 20:17:11 +0200 |
commit | 22f38cd3ff788e1953b8535f13588641d0d06b61 (patch) | |
tree | 12ac64b6ab048f119def653377a08ebff2baa02f /test/test_sanity.cpp | |
parent | 5b4fc32f4343446e442fb49e6f0cf49de5d72d06 (diff) | |
download | cubeb-22f38cd3ff788e1953b8535f13588641d0d06b61.tar.gz cubeb-22f38cd3ff788e1953b8535f13588641d0d06b61.zip |
Signature change for stream init and data callback
Diffstat (limited to 'test/test_sanity.cpp')
-rw-r--r-- | test/test_sanity.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp index 2aca71b..b09a4f9 100644 --- a/test/test_sanity.cpp +++ b/test/test_sanity.cpp @@ -40,7 +40,7 @@ static uint64_t total_frames_written; static int delay_callback; static long -test_data_callback(cubeb_stream * stm, void * user_ptr, void * inputbuffer, void * outputbuffer, long nframes) +test_data_callback(cubeb_stream * stm, void * user_ptr, const void * inputbuffer, void * outputbuffer, long nframes) { assert(stm && user_ptr == &dummy && outputbuffer && nframes > 0); memset(outputbuffer, 0, nframes * sizeof(short)); @@ -159,7 +159,7 @@ test_init_destroy_stream(void) params.rate = STREAM_RATE; params.channels = STREAM_CHANNELS; - r = cubeb_stream_init(ctx, &stream, "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0 && stream); @@ -188,7 +188,7 @@ test_init_destroy_multiple_streams(void) params.channels = STREAM_CHANNELS; for (i = 0; i < ARRAY_LENGTH(stream); ++i) { - r = cubeb_stream_init(ctx, &stream[i], "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream[i], "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0); assert(stream[i]); @@ -220,7 +220,7 @@ test_configure_stream(void) params.rate = STREAM_RATE; params.channels = 2; // panning - r = cubeb_stream_init(ctx, &stream, "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0 && stream); @@ -254,7 +254,7 @@ test_init_start_stop_destroy_multiple_streams(int early, int delay_ms) params.channels = STREAM_CHANNELS; for (i = 0; i < ARRAY_LENGTH(stream); ++i) { - r = cubeb_stream_init(ctx, &stream[i], "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream[i], "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0); assert(stream[i]); @@ -318,7 +318,7 @@ test_init_destroy_multiple_contexts_and_streams(void) assert(r == 0 && ctx[i]); for (j = 0; j < streams_per_ctx; ++j) { - r = cubeb_stream_init(ctx[i], &stream[i * streams_per_ctx + j], "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx[i], &stream[i * streams_per_ctx + j], "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0); assert(stream[i * streams_per_ctx + j]); @@ -353,7 +353,7 @@ test_basic_stream_operations(void) params.rate = STREAM_RATE; params.channels = STREAM_CHANNELS; - r = cubeb_stream_init(ctx, &stream, "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0 && stream); @@ -402,7 +402,7 @@ test_stream_position(void) params.rate = STREAM_RATE; params.channels = STREAM_CHANNELS; - r = cubeb_stream_init(ctx, &stream, "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_data_callback, test_state_callback, &dummy); assert(r == 0 && stream); @@ -475,7 +475,7 @@ static int do_drain; static int got_drain; static long -test_drain_data_callback(cubeb_stream * stm, void * user_ptr, void * inputbuffer, void * outputbuffer, long nframes) +test_drain_data_callback(cubeb_stream * stm, void * user_ptr, const void * inputbuffer, void * outputbuffer, long nframes) { assert(stm && user_ptr == &dummy && outputbuffer && nframes > 0); if (do_drain == 1) { @@ -518,7 +518,7 @@ test_drain(void) params.rate = STREAM_RATE; params.channels = STREAM_CHANNELS; - r = cubeb_stream_init(ctx, &stream, "test", NULL, ¶ms, STREAM_LATENCY, + r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, ¶ms, STREAM_LATENCY, test_drain_data_callback, test_drain_state_callback, &dummy); assert(r == 0 && stream); |