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

Skip to content
Commit ec21f2b5 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: prevent very short sleeps in callback thread

When the buffer size was set to the maximum, the calculation
of the sleep time did not account for the inability to write
ahead of the buffer threshold. So the CPU would wake up,
fail to write, sleep for the minimal time, then repeat.

Now the code checks for the max buffer size.

Bug: b/224871395
Test: see repro steps involving OboeTester in b/224871395#comment19
Test: Use OboeTester, TEST OUTPUT
Test: slide bufferSize fader to far right
Test: look for short sleeps using Perfetto
Change-Id: I2df9e2372c7464ce4f3e8156d7980ec4eadaa2c1
parent be55f493
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