summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index bc01ede..3921b68 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3810,10 +3810,6 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
size_t count = mActiveTracks.size();
mixer_state mixerStatus = MIXER_IDLE;
- if (mFlushPending) {
- flushHw_l();
- mFlushPending = false;
- }
// find out which tracks need to be processed
for (size_t i = 0; i < count; i++) {
sp<Track> t = mActiveTracks[i].promote();
@@ -3938,6 +3934,12 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
// compute volume for this track
processVolume_l(track, last);
}
+
+ if (mFlushPending) {
+ flushHw_l();
+ mFlushPending = false;
+ }
+
// remove all the tracks that need to be...
removeTracks_l(*tracksToRemove);