diff options
author | Marco Nelissen <marcone@google.com> | 2014-10-20 15:04:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-20 15:04:16 +0000 |
commit | 412b8e719e77e6e3284b87fd8ae1499d6ae76e06 (patch) | |
tree | 420fbf103908c92968bcb1c60876b336e2f3bdab /services/audioflinger | |
parent | ea0a01b29bbc7e5d0e49a75f6bc90910667af78f (diff) | |
parent | 0c2c161957023ee5c288c167c067f3a803922165 (diff) | |
download | frameworks_av-412b8e719e77e6e3284b87fd8ae1499d6ae76e06.zip frameworks_av-412b8e719e77e6e3284b87fd8ae1499d6ae76e06.tar.gz frameworks_av-412b8e719e77e6e3284b87fd8ae1499d6ae76e06.tar.bz2 |
am 0c2c1619: am 0cfc8f25: am 145a4c67: am 22bc10a3: Merge "Clear effect buffer before sending to chain" into lmp-dev
* commit '0c2c161957023ee5c288c167c067f3a803922165':
Clear effect buffer before sending to chain
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/Threads.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 44e34b7..fa20752 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -3670,6 +3670,9 @@ track_is_ready: ; if (getEffectChain_l(AUDIO_SESSION_OUTPUT_MIX) != 0) { mEffectBufferValid = true; + // as long as there are effects we should clear the effects buffer, to avoid + // passing a non-clean buffer to the effect chain + memset(mEffectBuffer, 0, mEffectBufferSize); } // sink or mix buffer must be cleared if all tracks are connected to an @@ -3690,10 +3693,6 @@ track_is_ready: ; // must imply MIXER_TRACKS_READY. // Later, we may clear buffers regardless, and skip much of this logic. } - // TODO - either mEffectBuffer or mSinkBuffer needs to be cleared. - if (mEffectBufferValid) { - memset(mEffectBuffer, 0, mEffectBufferSize); - } // FIXME as a performance optimization, should remember previous zero status memset(mSinkBuffer, 0, mNormalFrameCount * mFrameSize); } |