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

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

aaudio: prevent noise when stopping a stream

The DSP is stopped after the callback is stopped.
If the CPU is slow and the time gap is too large then
the DSP can play past the valid data and play invalid data.

To prevent noise, this new code clears part of the FIFO
beyond the valid data. Then when the DSP has read the valid
data it clears the entire FIFO.

Then it waits for the valid data to reach the speaker,
based on a latency estimation using timestamps.

Bug: 261783315
Test: Use OboeTester with repro steps in the bug.
Change-Id: Ia31df4b21c805b4ae9ca4fb8366068be1cce2c9f
parent a19b4145
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