diff options
author | John Lin <[email protected]> | 2024-04-29 13:46:57 -0700 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2024-04-30 10:52:29 +1200 |
commit | 19fcbefe1a9c5e22f8111af251df27b41658bc77 (patch) | |
tree | fc838880c3111deff3c84d30e3bbde015f311b28 /test | |
parent | b82e270abf5391afbb84f7fb678ae5ebe4a6eb13 (diff) | |
download | cubeb-19fcbefe1a9c5e22f8111af251df27b41658bc77.tar.gz cubeb-19fcbefe1a9c5e22f8111af251df27b41658bc77.zip |
Invalidate timing info buffers when destorying AAudio stream.
aaudio_stream_get_position() returns incorrect result because
aaudio_stream_init() recycled destroyed stream where the
timing_info buffers contain stale data.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_triple_buffer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_triple_buffer.cpp b/test/test_triple_buffer.cpp index a6e0049..d463c07 100644 --- a/test/test_triple_buffer.cpp +++ b/test/test_triple_buffer.cpp @@ -64,4 +64,7 @@ TEST(cubeb, triple_buffer) } t.join(); + + buffer.invalidate(); + ASSERT_FALSE(buffer.updated()); } |