aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2021-02-17 13:28:51 +1300
committerMatthew Gregan <[email protected]>2021-02-17 22:05:37 +1300
commit8942382280721117900072945767cece14eef046 (patch)
tree8eaf1f4f11b14da73a6e62b017755e97f800f31a /test
parent9beb8ed0c91f1b6ed7769d2c28c94a1d78b6c6f1 (diff)
downloadcubeb-8942382280721117900072945767cece14eef046.tar.gz
cubeb-8942382280721117900072945767cece14eef046.zip
Remove cubeb_stream_reset_default_device API.
Diffstat (limited to 'test')
-rw-r--r--test/test_sanity.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp
index e1a60d0..42a591d 100644
--- a/test/test_sanity.cpp
+++ b/test/test_sanity.cpp
@@ -642,65 +642,6 @@ TEST(cubeb, drain)
do_drain = 0;
}
-TEST(cubeb, device_reset)
-{
- int r;
- cubeb * ctx;
- cubeb_stream * stream;
- cubeb_stream_params params;
- uint64_t position;
-
- r = common_init(&ctx, "test_sanity");
- ASSERT_EQ(r, CUBEB_OK);
- ASSERT_NE(ctx, nullptr);
-
- if (strcmp(cubeb_get_backend_id(ctx), "wasapi")) {
- // cubeb_stream_reset_default_device is only useful and implemented in the
- // WASAPI backend.
- return;
- }
-
- params.format = STREAM_FORMAT;
- 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);
- ASSERT_EQ(r, CUBEB_OK);
- ASSERT_NE(stream, nullptr);
-
- r = cubeb_stream_start(stream);
- ASSERT_EQ(r, CUBEB_OK);
-
- uint32_t iterations = 5;
- uint64_t previous_position = 0;
- while (iterations--) {
- r = cubeb_stream_get_position(stream, &position);
- ASSERT_EQ(r, CUBEB_OK);
- ASSERT_GE(position, previous_position);
- previous_position = position;
- delay(100);
- }
-
- r = cubeb_stream_reset_default_device(stream);
- ASSERT_EQ(r, CUBEB_OK);
-
- iterations = 5;
- while (iterations--) {
- r = cubeb_stream_get_position(stream, &position);
- ASSERT_EQ(r, CUBEB_OK);
- ASSERT_GE(position, previous_position);
- previous_position = position;
- delay(100);
- }
-
- cubeb_stream_stop(stream);
- cubeb_stream_destroy(stream);
- cubeb_destroy(ctx);
-}
-
TEST(cubeb, DISABLED_eos_during_prefill)
{
// This test needs to be implemented.