aaudio: handle DSP stalls in clock model
The DSP can sometimes stall while playing. This might happen when switching internal routes. That can cause a large jump forward in the timestamps passed to the IsochronousCLockModel. When that happens we need to immediately move the window of the clock model forward and let it recalibrate using early timestamps. Otherwise we can end up with the DSP in the middle of the buffer and a clock model that is drifting too slowly towards a correct timing window. That can result in buzzing and clicks depending on the BufferSize. Also fix test_clock_model.cpp Added better simulation of timestamp jitter. Look for position in a range. Drift more slowly. Simulate a pause in the DSP. Bug: 264949085 Bug: 214121016 Bug: 200134791 Test: See bug for repro steps Test: atest AAudioTests Test: atest test_clock_model Change-Id: I9edf4d71ca99ef5827c3c368603a96c52491aad6
Loading
Please register or sign in to comment