summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-11-08 02:59:45 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-08 02:59:45 +0000
commit8510932d6e5a1d4628c700fbff8f836abe470713 (patch)
tree7d39f709063cd1734fe53491461b7ad83024f947 /services/audioflinger
parent5239bad27472b9ae42be924a98850683e5e70476 (diff)
parentccfeadcd252c1e002bfbce3ce55742d3eaac2ff6 (diff)
downloadframeworks_av-8510932d6e5a1d4628c700fbff8f836abe470713.zip
frameworks_av-8510932d6e5a1d4628c700fbff8f836abe470713.tar.gz
frameworks_av-8510932d6e5a1d4628c700fbff8f836abe470713.tar.bz2
am ccfeadcd: audioflinger: fix duplicating thread output buffers clear automerge: 02b5708
* commit 'ccfeadcd252c1e002bfbce3ce55742d3eaac2ff6': audioflinger: fix duplicating thread output buffers clear
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/Threads.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index e443476..71a6a73 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4660,7 +4660,11 @@ void AudioFlinger::DuplicatingThread::threadLoop_mix()
if (outputsReady(outputTracks)) {
mAudioMixer->process(AudioBufferProvider::kInvalidPTS);
} else {
- memset(mSinkBuffer, 0, mSinkBufferSize);
+ if (mMixerBufferValid) {
+ memset(mMixerBuffer, 0, mMixerBufferSize);
+ } else {
+ memset(mSinkBuffer, 0, mSinkBufferSize);
+ }
}
sleepTime = 0;
writeFrames = mNormalFrameCount;