From 97d547da43c9c41711d1ed1e3f4fa87c2ee3cb9a Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 2 Sep 2014 14:45:53 -0700 Subject: audio flinger: fix use of global effect buffer When float mixing format is enabled, audio effects use a specific buffer in 16 bit format. This buffer was not enabled when only global effects were present resulting in the mixer accumulating directly to the output sink buffer. Bug: 16202259. Change-Id: I3537d36c63196d97772f0ab22dd31d04dfa7fdd6 --- services/audioflinger/Threads.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'services') diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index f721d5c..942bff6 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -3662,6 +3662,10 @@ track_is_ready: ; // remove all the tracks that need to be... removeTracks_l(*tracksToRemove); + if (getEffectChain_l(AUDIO_SESSION_OUTPUT_MIX) != 0) { + mEffectBufferValid = true; + } + // sink or mix buffer must be cleared if all tracks are connected to an // effect chain as in this case the mixer will not write to the sink or mix buffer // and track effects will accumulate into it -- cgit v1.1