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

Skip to content
Commit ab9071b8 authored by Eric Laurent's avatar Eric Laurent
Browse files

audioflinger: fix active sleep time calculation.

When an audioTrack underruns, the audioflinger mixer thread
sleeps for a certain time to give the app a chance to recover.
This time is based on the reported audio HAL latency.
Some audio HALs implementing deep buffering have a variable
latency and this creates a problem if the sleep time is cached
when the output stream is opened and not updated afterwards.

This change derives the active sleep time from the mix buffer
framecount instead of the latency. This is more conservative
but works for variable latency.

Bug 6588525.

Change-Id: Ia892fc290fe06f836565c3ae15f7a2ce026c88c6
parent 39993085
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