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_audio.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_audio.cpp')
-rw-r--r-- | test/test_audio.cpp | 8 |
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, ¶ms, + r = cubeb_stream_init(ctx, &stream, "test tone", NULL, NULL, NULL, ¶ms, 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, ¶ms, + r = cubeb_stream_init(ctx, &stream, "test tone", NULL, NULL, NULL, ¶ms, 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); |