Bug 1902263 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It turns out that `stm->previous_clock` is not being reset when re-initialization, [`reinitialize_stream()` calls `aaudio_stream_init_impl()`](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L905), which doesn't clear the value (only [assigned in user-called `aaudio_stream_init()`](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L1313)).

It makes [the test](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L1592) fail and incorrectly use `stm->timing_info` even when it's not updated.
It turns out that `stm->previous_clock` is not being reset when re-initialization, [`reinitialize_stream()` calls `aaudio_stream_init_impl()`](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L905), which doesn't clear the value (only [assigned in user-called `aaudio_stream_init()`](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L1313)).

It makes [the test](https://github.com/mozilla/cubeb/blob/master/src/cubeb_aaudio.cpp#L1592) fail and incorrectly use `stm->timing_info` even when it's not updated.

Should we keep the last `stm->previous_clock` value and add it to new positions?

Back to Bug 1902263 Comment 4