aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_audio.cpp
diff options
context:
space:
mode:
authorAlex Chronopoulos <[email protected]>2016-01-20 20:17:11 +0200
committerAlex Chronopoulos <[email protected]>2016-01-20 20:17:11 +0200
commit22f38cd3ff788e1953b8535f13588641d0d06b61 (patch)
tree12ac64b6ab048f119def653377a08ebff2baa02f /test/test_audio.cpp
parent5b4fc32f4343446e442fb49e6f0cf49de5d72d06 (diff)
downloadcubeb-22f38cd3ff788e1953b8535f13588641d0d06b61.tar.gz
cubeb-22f38cd3ff788e1953b8535f13588641d0d06b61.zip
Signature change for stream init and data callback
Diffstat (limited to 'test/test_audio.cpp')
-rw-r--r--test/test_audio.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_audio.cpp b/test/test_audio.cpp
index 5e0cd75..7a8adf6 100644
--- a/test/test_audio.cpp
+++ b/test/test_audio.cpp
@@ -73,7 +73,7 @@ void synth_run_float(synth_state* synth, float* audiobuffer, long nframes)
}
}
-long data_cb_float(cubeb_stream *stream, void *user, void * inputbuffer, void *outputbuffer, long nframes)
+long data_cb_float(cubeb_stream *stream, void *user, const void * inputbuffer, void *outputbuffer, long nframes)
{
synth_state *synth = (synth_state *)user;
synth_run_float(synth, (float*)outputbuffer, nframes);
@@ -92,7 +92,7 @@ void synth_run_16bit(synth_state* synth, short* audiobuffer, long nframes)
}
}
-long data_cb_short(cubeb_stream *stream, void *user, void * inputbuffer, void *outputbuffer, long nframes)
+long data_cb_short(cubeb_stream *stream, void *user, const void * inputbuffer, void *outputbuffer, long nframes)
{
synth_state *synth = (synth_state *)user;
synth_run_16bit(synth, (short*)outputbuffer, nframes);
@@ -160,7 +160,7 @@ int run_test(int num_channels, int sampling_rate, int is_float)
goto cleanup;
}
- r = cubeb_stream_init(ctx, &stream, "test tone", NULL, &params,
+ r = cubeb_stream_init(ctx, &stream, "test tone", NULL, NULL, NULL, &params,
100, is_float ? data_cb_float : data_cb_short, state_cb, synth);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb stream: %d\n", r);
@@ -212,7 +212,7 @@ int run_panning_volume_test(int is_float)
goto cleanup;
}
- r = cubeb_stream_init(ctx, &stream, "test tone", NULL, &params,
+ r = cubeb_stream_init(ctx, &stream, "test tone", NULL, NULL, NULL, &params,
100, is_float ? data_cb_float : data_cb_short, state_cb, synth);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb stream: %d\n", r);