From 554bc677837d05f5052592044f77e4de78520a04 Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sat, 23 Jan 2016 00:06:41 +0100 Subject: Revert "Audio Effects are not processing first buffer" This causes a short and loud noise when turning off effects while an audio track is playing or when an audio track is started with audio effects enabled. The noise appears to be non-existent if the volume level is set to its maximum. This reverts commit d15a8bd157cb531716bd3e15561f557e74588801. Change-Id: I2b8dd3447d673b4b98018710bc10c1eeb282598e --- services/audioflinger/Effects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/audioflinger') diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp index fb1e80c..879b6c9 100644 --- a/services/audioflinger/Effects.cpp +++ b/services/audioflinger/Effects.cpp @@ -1466,14 +1466,14 @@ void AudioFlinger::EffectChain::process_l() } size_t size = mEffects.size(); - for (size_t i = 0; i < size; i++) { - mEffects[i]->updateState(); - } if (doProcess) { for (size_t i = 0; i < size; i++) { mEffects[i]->process(); } } + for (size_t i = 0; i < size; i++) { + mEffects[i]->updateState(); + } } // addEffect_l() must be called with PlaybackThread::mLock held -- cgit v1.1