aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/cubeb/cubeb.h6
-rw-r--r--test/test_audio.cpp2
-rw-r--r--test/test_deadlock.cpp1
-rw-r--r--test/test_devices.cpp1
-rw-r--r--test/test_duplex.cpp2
-rw-r--r--test/test_latency.cpp3
-rw-r--r--test/test_loopback.cpp1
-rw-r--r--test/test_mixer.cpp6
-rw-r--r--test/test_overload_callback.cpp1
-rw-r--r--test/test_record.cpp1
-rw-r--r--test/test_resampler.cpp1
-rw-r--r--test/test_sanity.cpp11
-rw-r--r--test/test_tone.cpp1
13 files changed, 32 insertions, 5 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h
index a305aa3..64f3a8d 100644
--- a/include/cubeb/cubeb.h
+++ b/include/cubeb/cubeb.h
@@ -53,16 +53,18 @@ extern "C" {
output_params.format = CUBEB_SAMPLE_FLOAT32NE;
output_params.rate = rate;
output_params.channels = 2;
+ output_params.prefs = CUBEB_STREAM_PREF_NONE;
cubeb_stream_params input_params;
input_params.format = CUBEB_SAMPLE_FLOAT32NE;
input_params.rate = rate;
input_params.channels = 1;
+ input_params.prefs = CUBEB_STREAM_PREF_NONE;
cubeb_stream * stm;
rv = cubeb_stream_init(app_ctx, &stm, "Example Stream 1",
- NULL, input_params,
- NULL, output_params,
+ NULL, &input_params,
+ NULL, &output_params,
latency_frames,
data_cb, state_cb,
NULL);
diff --git a/test/test_audio.cpp b/test/test_audio.cpp
index 5548b34..df51366 100644
--- a/test/test_audio.cpp
+++ b/test/test_audio.cpp
@@ -123,6 +123,7 @@ int run_test(int num_channels, layout_info layout, int sampling_rate, int is_flo
params.rate = sampling_rate;
params.channels = num_channels;
params.layout = layout.layout;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
synth_state synth(params.channels, params.rate);
@@ -171,6 +172,7 @@ int run_panning_volume_test(int is_float)
params.rate = 44100;
params.channels = 2;
params.layout = CUBEB_LAYOUT_STEREO;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
synth_state synth(params.channels, params.rate);
diff --git a/test/test_deadlock.cpp b/test/test_deadlock.cpp
index 38a9ad6..bc572af 100644
--- a/test/test_deadlock.cpp
+++ b/test/test_deadlock.cpp
@@ -217,6 +217,7 @@ TEST(cubeb, run_deadlock_test)
params.rate = 44100;
params.channels = 2;
params.layout = CUBEB_LAYOUT_STEREO;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
cubeb_stream * stream = NULL;
int r = cubeb_stream_init(ctx, &stream, "test deadlock", NULL, NULL, NULL,
diff --git a/test/test_devices.cpp b/test/test_devices.cpp
index 93c8692..10c14c3 100644
--- a/test/test_devices.cpp
+++ b/test/test_devices.cpp
@@ -190,6 +190,7 @@ TEST(cubeb, enumerate_devices)
input_params.rate = output_params.rate = 48000;
input_params.channels = output_params.channels = 1;
input_params.layout = output_params.layout = CUBEB_LAYOUT_MONO;
+ input_params.prefs = output_params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "Cubeb duplex",
NULL, &input_params, NULL, &output_params,
diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp
index 427b503..09315ba 100644
--- a/test/test_duplex.cpp
+++ b/test/test_duplex.cpp
@@ -101,10 +101,12 @@ TEST(cubeb, duplex)
input_params.rate = 48000;
input_params.channels = 1;
input_params.layout = CUBEB_LAYOUT_MONO;
+ input_params.prefs = CUBEB_STREAM_PREF_NONE;
output_params.format = STREAM_FORMAT;
output_params.rate = 48000;
output_params.channels = 2;
output_params.layout = CUBEB_LAYOUT_STEREO;
+ output_params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_get_min_latency(ctx, &output_params, &latency_frames);
ASSERT_EQ(r, CUBEB_OK) << "Could not get minimal latency";
diff --git a/test/test_latency.cpp b/test/test_latency.cpp
index 6af39d5..f4aa6b0 100644
--- a/test/test_latency.cpp
+++ b/test/test_latency.cpp
@@ -34,7 +34,8 @@ TEST(cubeb, latency)
CUBEB_SAMPLE_FLOAT32NE,
preferred_rate,
max_channels,
- CUBEB_LAYOUT_UNDEFINED
+ CUBEB_LAYOUT_UNDEFINED,
+ CUBEB_STREAM_PREF_NONE
};
r = cubeb_get_min_latency(ctx, &params, &latency_frames);
ASSERT_TRUE(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED);
diff --git a/test/test_loopback.cpp b/test/test_loopback.cpp
index 91b7cf0..4fe5137 100644
--- a/test/test_loopback.cpp
+++ b/test/test_loopback.cpp
@@ -275,6 +275,7 @@ void run_loopback_duplex_test(bool is_float)
output_params.rate = SAMPLE_FREQUENCY;
output_params.channels = 1;
output_params.layout = CUBEB_LAYOUT_MONO;
+ output_params.prefs = CUBEB_STREAM_PREF_NONE;
std::unique_ptr<user_state_loopback> user_data(new user_state_loopback());
ASSERT_TRUE(!!user_data) << "Error allocating user data";
diff --git a/test/test_mixer.cpp b/test/test_mixer.cpp
index fc9efef..b7daea9 100644
--- a/test/test_mixer.cpp
+++ b/test/test_mixer.cpp
@@ -114,7 +114,8 @@ downmix_test(float const * data, cubeb_channel_layout in_layout, cubeb_channel_l
STREAM_FORMAT,
STREAM_FREQUENCY,
layout_infos[in_layout].channels,
- in_layout
+ in_layout,
+ CUBEB_STREAM_PREF_NONE
};
cubeb_stream_params out_params = {
@@ -124,7 +125,8 @@ downmix_test(float const * data, cubeb_channel_layout in_layout, cubeb_channel_l
// smaller than or equal to the input channels.
(out_layout == CUBEB_LAYOUT_UNDEFINED) ?
layout_infos[in_layout].channels : layout_infos[out_layout].channels,
- out_layout
+ out_layout,
+ CUBEB_STREAM_PREF_NONE
};
if (!cubeb_should_downmix(&in_params, &out_params)) {
diff --git a/test/test_overload_callback.cpp b/test/test_overload_callback.cpp
index 73982ef..05c01e8 100644
--- a/test/test_overload_callback.cpp
+++ b/test/test_overload_callback.cpp
@@ -68,6 +68,7 @@ TEST(cubeb, overload_callback)
output_params.rate = 48000;
output_params.channels = 2;
output_params.layout = CUBEB_LAYOUT_STEREO;
+ output_params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_get_min_latency(ctx, &output_params, &latency_frames);
ASSERT_EQ(r, CUBEB_OK);
diff --git a/test/test_record.cpp b/test/test_record.cpp
index b25eb8a..635beee 100644
--- a/test/test_record.cpp
+++ b/test/test_record.cpp
@@ -94,6 +94,7 @@ TEST(cubeb, record)
params.rate = SAMPLE_FREQUENCY;
params.channels = 1;
params.layout = CUBEB_LAYOUT_UNDEFINED;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "Cubeb record (mono)", NULL, &params, NULL, nullptr,
4096, data_cb_record, state_cb_record, &stream_state);
diff --git a/test/test_resampler.cpp b/test/test_resampler.cpp
index 1f5fb8f..a5c335f 100644
--- a/test/test_resampler.cpp
+++ b/test/test_resampler.cpp
@@ -333,6 +333,7 @@ void test_resampler_duplex(uint32_t input_channels, uint32_t output_channels,
input_params.rate = input_rate;
state.output_rate = output_params.rate = output_rate;
state.target_rate = target_rate;
+ input_params.prefs = output_params.prefs = CUBEB_STREAM_PREF_NONE;
long got;
cubeb_resampler * resampler =
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp
index db441d4..d3546d6 100644
--- a/test/test_sanity.cpp
+++ b/test/test_sanity.cpp
@@ -125,6 +125,8 @@ TEST(cubeb, context_variables)
params.format = STREAM_FORMAT;
params.rate = STREAM_RATE;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
+
r = cubeb_get_min_latency(ctx, &params, &value);
ASSERT_TRUE(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED);
if (r == CUBEB_OK) {
@@ -160,6 +162,7 @@ TEST(cubeb, init_destroy_stream)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_data_callback, test_state_callback, &dummy);
@@ -186,6 +189,7 @@ TEST(cubeb, init_destroy_multiple_streams)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
for (i = 0; i < ARRAY_LENGTH(stream); ++i) {
r = cubeb_stream_init(ctx, &stream[i], "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
@@ -216,6 +220,7 @@ TEST(cubeb, configure_stream)
params.rate = STREAM_RATE;
params.channels = 2; // panning
params.layout = CUBEB_LAYOUT_STEREO;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_data_callback, test_state_callback, &dummy);
@@ -247,6 +252,7 @@ TEST(cubeb, configure_stream_undefined_layout)
params.rate = STREAM_RATE;
params.channels = 2; // panning
params.layout = CUBEB_LAYOUT_UNDEFINED;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_data_callback, test_state_callback, &dummy);
@@ -282,6 +288,7 @@ test_init_start_stop_destroy_multiple_streams(int early, int delay_ms)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
for (i = 0; i < ARRAY_LENGTH(stream); ++i) {
r = cubeb_stream_init(ctx, &stream[i], "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
@@ -366,6 +373,7 @@ TEST(cubeb, init_destroy_multiple_contexts_and_streams)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
for (i = 0; i < ARRAY_LENGTH(ctx); ++i) {
r = common_init(&ctx[i], "test_sanity");
@@ -404,6 +412,7 @@ TEST(cubeb, basic_stream_operations)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_data_callback, test_state_callback, &dummy);
@@ -452,6 +461,7 @@ TEST(cubeb, stream_position)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_data_callback, test_state_callback, &dummy);
@@ -585,6 +595,7 @@ TEST(cubeb, drain)
params.rate = STREAM_RATE;
params.channels = STREAM_CHANNELS;
params.layout = STREAM_LAYOUT;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
r = cubeb_stream_init(ctx, &stream, "test", NULL, NULL, NULL, &params, STREAM_LATENCY,
test_drain_data_callback, test_drain_state_callback, &dummy);
diff --git a/test/test_tone.cpp b/test/test_tone.cpp
index 3cfc0b0..09bc2a7 100644
--- a/test/test_tone.cpp
+++ b/test/test_tone.cpp
@@ -95,6 +95,7 @@ TEST(cubeb, tone)
params.rate = SAMPLE_FREQUENCY;
params.channels = 1;
params.layout = CUBEB_LAYOUT_MONO;
+ params.prefs = CUBEB_STREAM_PREF_NONE;
std::unique_ptr<cb_user_data> user_data(new cb_user_data());
ASSERT_TRUE(!!user_data) << "Error allocating user data";