diff options
author | Haynes Mathew George <hgeorge@codeaurora.org> | 2016-05-05 19:02:06 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-19 13:38:26 -0700 |
commit | e4575aeb5d66f71b6ef6c611570ea96df81c1246 (patch) | |
tree | cb4224942057b6c7d2445bd3d0a8ba1f0f86c43e /services/audioflinger | |
parent | 6fde774471629832951e9b9b2e0d758e10f6431d (diff) | |
download | frameworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.zip frameworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.tar.gz frameworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.tar.bz2 |
audioflinger: Always process volume commands from a latest track
Process them irrespective of whether the track is invalid.
Ignoring to do so may lead to glitches/loud bursts in audio when a new
track reuses the same output.
CRs-Fixed: 1002448
Change-Id: I9afbdd221db3a7311eb0ec8bb75852cf5409084e
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/Threads.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index ee5dc24..e5e8bdb 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -5169,15 +5169,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr if (track->isInvalid()) { ALOGW("An invalidated track shouldn't be in active list"); tracksToRemove->add(track); - continue; - } - - if (track->mState == TrackBase::IDLE) { + } else if (track->mState == TrackBase::IDLE) { ALOGW("An idle track shouldn't be in active list"); - continue; - } - - if (track->isPausing()) { + } else if (track->isPausing()) { track->setPaused(); if (last) { if (mHwSupportsPause && !mHwPaused) { @@ -5200,7 +5194,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr if (last) { mFlushPending = true; } - } else if (track->isResumePending()){ + } else if (track->isResumePending()) { track->resumeAck(); if (last) { if (mPausedBytesRemaining) { |