Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0cae043f authored by Atneya Nair's avatar Atneya Nair
Browse files

Allow frame count regress in AudioStreamOut

AudioStreamOut attempts to detect wraparound by assuming that the
HAL frame count is monotonic, which is not true wrt gapless offload
tracks. When a non-monotonic update is detected, we freeze the fw
side framecount, rather than updating. The exception is when we
are notified that framecount will reset (e.g. flush()).

Since the notification that we are transitioning can occur arbitrarily
in advance from the HAL, upon presentationComplete for a offload stream,
we notify AudioStreamOut that we expect an upcoming framecount reset
from the HAL.
Then, we do not suppress the next detected non-monotonic sample, and
appropriately decrease the uint64 mRenderPosition.

Test: offloadAudioTrackPlayer manual test app (exoplayer test in
google3)

Bug: 191950723
Change-Id: I6060d0a9750783c2e2a7b46ce592c042d1405aa0
parent 688cec6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment