Skip to content

aaudio: restart stream when flushing

Thomas Guillem requested to merge tguillem/vlc:aaudio-fixes into master

Since flush is not working.

There are 2 main issues:

  • AAudioStream_getTimestamp() could fail from Flush(), resulting in the impossibility to report a correct timing. As the doc says: "TODO review Frame counters are not reset by a flush", and we need a point of comparison after a flush.

  • Some devices (seen on The Galaxy S22 Ultra API Level 31) can't report a timestamp once the stream is flushed, resulting in the impossibility to report a correct timing.

Now, the whole Flush() function take between 10ms and 25ms (depending on the device).

Fixes #27917 (closed)

Merge request reports