summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorYuuhi Yamaguchi <yuuhi.x.yamaguchi@sonyericsson.com>2011-02-04 15:24:34 +0100
committerJohan Redestig <johan.redestig@sonyericsson.com>2011-02-04 15:24:34 +0100
commit2151d7b8c2dd77c9887691db30396937be778141 (patch)
treed2e10de09bc049edf1d0568a392855dfd765c3d0 /services
parent13e05b3f569965d97ec7d7f65e4cd46c6a22c23d (diff)
downloadframeworks_av-2151d7b8c2dd77c9887691db30396937be778141.zip
frameworks_av-2151d7b8c2dd77c9887691db30396937be778141.tar.gz
frameworks_av-2151d7b8c2dd77c9887691db30396937be778141.tar.bz2
Initialize resampling buffer per track.
When resampling too short sound, AudioMixer uses previous tracks buffer. So we re-initialize the temporary buffer per loop to avoid it. Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioMixer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 8aaa325..433f1f7 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -975,7 +975,6 @@ void AudioMixer::process__genericResampling(state_t* state)
{
int32_t* const outTemp = state->outputTemp;
const size_t size = sizeof(int32_t) * MAX_NUM_CHANNELS * state->frameCount;
- memset(outTemp, 0, size);
size_t numFrames = state->frameCount;
@@ -997,6 +996,7 @@ void AudioMixer::process__genericResampling(state_t* state)
}
e0 &= ~(e1);
int32_t *out = t1.mainBuffer;
+ memset(outTemp, 0, size);
while (e1) {
const int i = 31 - __builtin_clz(e1);
e1 &= ~(1<<i);