diff options
Diffstat (limited to 'test/test_sanity.cpp')
-rw-r--r-- | test/test_sanity.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp index 06d9daf..caebe1b 100644 --- a/test/test_sanity.cpp +++ b/test/test_sanity.cpp @@ -400,6 +400,7 @@ TEST(cubeb, basic_stream_operations) cubeb_stream * stream; cubeb_stream_params params; uint64_t position; + uint32_t latency; r = common_init(&ctx, "test_sanity"); ASSERT_EQ(r, CUBEB_OK); @@ -416,25 +417,34 @@ TEST(cubeb, basic_stream_operations) ASSERT_EQ(r, CUBEB_OK); ASSERT_NE(stream, nullptr); - /* position before stream has started */ + /* position and latency before stream has started */ r = cubeb_stream_get_position(stream, &position); ASSERT_EQ(r, CUBEB_OK); ASSERT_EQ(position, 0u); + r = cubeb_stream_get_latency(stream, &latency); + ASSERT_EQ(r, CUBEB_OK); + r = cubeb_stream_start(stream); ASSERT_EQ(r, CUBEB_OK); - /* position after while stream running */ + /* position and latency after while stream running */ r = cubeb_stream_get_position(stream, &position); ASSERT_EQ(r, CUBEB_OK); + r = cubeb_stream_get_latency(stream, &latency); + ASSERT_EQ(r, CUBEB_OK); + r = cubeb_stream_stop(stream); ASSERT_EQ(r, CUBEB_OK); - /* position after stream has stopped */ + /* position and latency after stream has stopped */ r = cubeb_stream_get_position(stream, &position); ASSERT_EQ(r, CUBEB_OK); + r = cubeb_stream_get_latency(stream, &latency); + ASSERT_EQ(r, CUBEB_OK); + cubeb_stream_destroy(stream); cubeb_destroy(ctx); } |