AudioTrack: Allow flush in flush state to clear subsequent written data

Fixes Photos a/v sync issue introduced by
commit 1d3556d6a0

Test: Photos, pause, then seek several times, then play.
Test: CTS AudioTrackTest, Bluetooth, Offload, Gallery, Play Music.
Bug: 79327282
Change-Id: I9de8edd88b526b5a9dbc9cd720bf725474949dfc
gugelfrei
Andy Hung 6 years ago
parent 183eb5fb74
commit 4c5ed30aeb

@ -806,7 +806,7 @@ void AudioTrack::flush()
return;
}
AutoMutex lock(mLock);
if (mState == STATE_ACTIVE || mState == STATE_FLUSHED) {
if (mState == STATE_ACTIVE) {
return;
}
flush_l();

Loading…
Cancel
Save