aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorDamien Zammit <[email protected]>2017-02-21 16:09:05 +1100
committerMatthew Gregan <[email protected]>2017-03-13 11:00:12 +1300
commit4c39aae8d31334dc46d3b69d9695eed790fac38b (patch)
tree711b285becb19f69053c82ed64a7deb6ad320570 /test
parent7b082450d2b57a4f2c541cb69558ae28682163f2 (diff)
downloadcubeb-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')
-rw-r--r--test/test_audio.cpp4
-rw-r--r--test/test_devices.cpp2
-rw-r--r--test/test_duplex.cpp2
-rw-r--r--test/test_latency.cpp2
-rw-r--r--test/test_overload_callback.cpp2
-rw-r--r--test/test_record.cpp2
-rw-r--r--test/test_sanity.cpp22
-rw-r--r--test/test_tone.cpp2
8 files changed, 19 insertions, 19 deletions
diff --git a/test/test_audio.cpp b/test/test_audio.cpp
index 451e1e8..d8eb26d 100644
--- a/test/test_audio.cpp
+++ b/test/test_audio.cpp
@@ -119,7 +119,7 @@ int run_test(int num_channels, layout_info layout, int sampling_rate, int is_flo
cubeb *ctx = NULL;
- r = cubeb_init(&ctx, "Cubeb audio test: channels");
+ r = cubeb_init(&ctx, "Cubeb audio test: channels", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
return r;
@@ -168,7 +168,7 @@ int run_panning_volume_test(int is_float)
cubeb *ctx = NULL;
- r = cubeb_init(&ctx, "Cubeb audio test");
+ r = cubeb_init(&ctx, "Cubeb audio test", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
return r;
diff --git a/test/test_devices.cpp b/test/test_devices.cpp
index e109df0..ee062f4 100644
--- a/test/test_devices.cpp
+++ b/test/test_devices.cpp
@@ -109,7 +109,7 @@ TEST(cubeb, enumerate_devices)
cubeb * ctx = NULL;
cubeb_device_collection * collection = NULL;
- r = cubeb_init(&ctx, "Cubeb audio test");
+ r = cubeb_init(&ctx, "Cubeb audio test", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
ASSERT_EQ(r, CUBEB_OK);
diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp
index 21ec633..9620a1e 100644
--- a/test/test_duplex.cpp
+++ b/test/test_duplex.cpp
@@ -82,7 +82,7 @@ TEST(cubeb, duplex)
user_state_duplex stream_state = { false };
uint32_t latency_frames = 0;
- r = cubeb_init(&ctx, "Cubeb duplex example");
+ r = cubeb_init(&ctx, "Cubeb duplex example", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
ASSERT_EQ(r, CUBEB_OK);
diff --git a/test/test_latency.cpp b/test/test_latency.cpp
index 94c9e5c..77a9908 100644
--- a/test/test_latency.cpp
+++ b/test/test_latency.cpp
@@ -11,7 +11,7 @@ TEST(cubeb, latency)
uint32_t latency_frames;
cubeb_channel_layout layout;
- r = cubeb_init(&ctx, "Cubeb audio test");
+ r = cubeb_init(&ctx, "Cubeb audio test", NULL);
ASSERT_EQ(r, CUBEB_OK);
r = cubeb_get_max_channel_count(ctx, &max_channels);
diff --git a/test/test_overload_callback.cpp b/test/test_overload_callback.cpp
index be8ddeb..06da63e 100644
--- a/test/test_overload_callback.cpp
+++ b/test/test_overload_callback.cpp
@@ -57,7 +57,7 @@ TEST(cubeb, overload_callback)
int r;
uint32_t latency_frames = 0;
- r = cubeb_init(&ctx, "Cubeb callback overload");
+ r = cubeb_init(&ctx, "Cubeb callback overload", NULL);
ASSERT_EQ(r, CUBEB_OK);
output_params.format = STREAM_FORMAT;
diff --git a/test/test_record.cpp b/test/test_record.cpp
index 677e299..79ca5b6 100644
--- a/test/test_record.cpp
+++ b/test/test_record.cpp
@@ -76,7 +76,7 @@ TEST(cubeb, record)
int r;
user_state_record stream_state = { false };
- r = cubeb_init(&ctx, "Cubeb record example");
+ r = cubeb_init(&ctx, "Cubeb record example", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
ASSERT_EQ(r, CUBEB_OK);
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);
diff --git a/test/test_tone.cpp b/test/test_tone.cpp
index 12e64bb..2881c09 100644
--- a/test/test_tone.cpp
+++ b/test/test_tone.cpp
@@ -101,7 +101,7 @@ TEST(cubeb, tone)
struct cb_user_data *user_data;
int r;
- r = cubeb_init(&ctx, "Cubeb tone example");
+ r = cubeb_init(&ctx, "Cubeb tone example", NULL);
if (r != CUBEB_OK) {
fprintf(stderr, "Error initializing cubeb library\n");
ASSERT_EQ(r, CUBEB_OK);