summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorRicardo Garcia <rago@google.com>2014-08-06 19:11:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-06 17:19:40 +0000
commit7f3f2fa386b8dd917022663bcb01f10ea67061be (patch)
tree8bfe560b2e67fd002f8d39150d7208330e63ced3 /services/audioflinger
parent92ce4715315bddd158c7d4028556632f0547e3b9 (diff)
parent322bab26dc3fe9bd9c1cbb829dc62ff44f1ae810 (diff)
downloadframeworks_av-7f3f2fa386b8dd917022663bcb01f10ea67061be.zip
frameworks_av-7f3f2fa386b8dd917022663bcb01f10ea67061be.tar.gz
frameworks_av-7f3f2fa386b8dd917022663bcb01f10ea67061be.tar.bz2
Merge "MediaServer crashing and audio effects not applied to TTS." into lmp-dev
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/Effects.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 77aca00..ec3d731 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -1387,7 +1387,12 @@ void AudioFlinger::EffectChain::clearInputBuffer()
// Must be called with EffectChain::mLock locked
void AudioFlinger::EffectChain::clearInputBuffer_l(sp<ThreadBase> thread)
{
- memset(mInBuffer, 0, thread->frameCount() * thread->frameSize());
+ // TODO: This will change in the future, depending on multichannel
+ // and sample format changes for effects.
+ // Currently effects processing is only available for stereo, AUDIO_FORMAT_PCM_16_BIT
+ // (4 bytes frame size)
+ const size_t frameSize = audio_bytes_per_sample(AUDIO_FORMAT_PCM_16_BIT) * FCC_2;
+ memset(mInBuffer, 0, thread->frameCount() * frameSize);
}
// Must be called with EffectChain::mLock locked