Skip to content

Commit

Permalink
Initialize cubeb_stream_params.prefs field in more tests to avoid ran…
Browse files Browse the repository at this point in the history
…dom failures.
  • Loading branch information
kinetiknz committed Mar 27, 2018
1 parent 7401fc2 commit 57b4d6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_duplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ TEST(cubeb, duplex_collection_change)
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";
Expand Down
2 changes: 2 additions & 0 deletions test/test_loopback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ void run_loopback_separate_streams_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";
Expand Down Expand Up @@ -515,6 +516,7 @@ void run_loopback_device_selection_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";
Expand Down

0 comments on commit 57b4d6b

Please sign in to comment.