diff options
author | Damien Zammit <[email protected]> | 2017-02-21 16:09:05 +1100 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2017-03-13 11:00:12 +1300 |
commit | 4c39aae8d31334dc46d3b69d9695eed790fac38b (patch) | |
tree | 711b285becb19f69053c82ed64a7deb6ad320570 /test/test_sanity.cpp | |
parent | 7b082450d2b57a4f2c541cb69558ae28682163f2 (diff) | |
download | cubeb-4c39aae8d31334dc46d3b69d9695eed790fac38b.tar.gz cubeb-4c39aae8d31334dc46d3b69d9695eed790fac38b.zip |
cubeb-api: Give cubeb_init a third param, backend name
This allows forcing of a particular backend by name,
*if* it was compiled in, otherwise default list is tried
in default order as before.
Tests updated to reflect new api. (Gecko change required)
Using JACK backend:
100% tests passed, 0 tests failed out of 13
Total Test time (real) = 183.75 sec
Signed-off-by: Damien Zammit <[email protected]>
Diffstat (limited to 'test/test_sanity.cpp')
-rw-r--r-- | test/test_sanity.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp index 688be85..266e131 100644 --- a/test/test_sanity.cpp +++ b/test/test_sanity.cpp @@ -85,7 +85,7 @@ TEST(cubeb, init_destroy_context) cubeb * ctx; char const* backend_id; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -106,7 +106,7 @@ TEST(cubeb, init_destroy_multiple_contexts) ASSERT_EQ(ARRAY_LENGTH(ctx), ARRAY_LENGTH(order)); for (i = 0; i < ARRAY_LENGTH(ctx); ++i) { - r = cubeb_init(&ctx[i], NULL); + r = cubeb_init(&ctx[i], NULL, NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx[i], nullptr); } @@ -124,7 +124,7 @@ TEST(cubeb, context_variables) uint32_t value; cubeb_stream_params params; - r = cubeb_init(&ctx, "test_context_variables"); + r = cubeb_init(&ctx, "test_context_variables", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -157,7 +157,7 @@ TEST(cubeb, init_destroy_stream) cubeb_stream * stream; cubeb_stream_params params; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -186,7 +186,7 @@ TEST(cubeb, init_destroy_multiple_streams) cubeb_stream * stream[8]; cubeb_stream_params params; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -219,7 +219,7 @@ TEST(cubeb, configure_stream) cubeb_stream * stream; cubeb_stream_params params; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -255,7 +255,7 @@ test_init_start_stop_destroy_multiple_streams(int early, int delay_ms) cubeb_stream * stream[8]; cubeb_stream_params params; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -355,7 +355,7 @@ TEST(cubeb, init_destroy_multiple_contexts_and_streams) #endif for (i = 0; i < ARRAY_LENGTH(ctx); ++i) { - r = cubeb_init(&ctx[i], "test_sanity"); + r = cubeb_init(&ctx[i], "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx[i], nullptr); @@ -383,7 +383,7 @@ TEST(cubeb, basic_stream_operations) cubeb_stream_params params; uint64_t position; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -434,7 +434,7 @@ TEST(cubeb, stream_position) total_frames_written = 0; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); @@ -574,7 +574,7 @@ TEST(cubeb, drain) delay_callback = 0; total_frames_written = 0; - r = cubeb_init(&ctx, "test_sanity"); + r = cubeb_init(&ctx, "test_sanity", NULL); ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(ctx, nullptr); |