From 26debac448dcc2f52c70ea082e2f5ede2a9ca91d Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 24 Feb 2012 07:25:40 -0800 Subject: Move declaration of mixerStatus to inner block mixerStatus was being declared (and initialized) too early, which also resulted in a duplicate initialization. Moved the declaration into the block where it is actually used. Change-Id: Ifdcfefe362a5efe3493dd616cdb44645c6f9aed5 --- services/audioflinger/AudioFlinger.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'services') diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 6256951..7627dab 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1935,7 +1935,6 @@ AudioFlinger::MixerThread::~MixerThread() bool AudioFlinger::MixerThread::threadLoop() { Vector< sp > tracksToRemove; - mixer_state mixerStatus = MIXER_IDLE; nsecs_t standbyTime = systemTime(); size_t mixBufferSize = mFrameCount * mFrameSize; // FIXME: Relaxed timing because of a certain device that can't meet latency @@ -1988,7 +1987,7 @@ bool AudioFlinger::MixerThread::threadLoop() #endif processConfigEvents(); - mixerStatus = MIXER_IDLE; + mixer_state mixerStatus = MIXER_IDLE; { // scope for mLock Mutex::Autolock _l(mLock); @@ -2680,7 +2679,6 @@ void AudioFlinger::DirectOutputThread::applyVolume(uint16_t leftVol, uint16_t ri bool AudioFlinger::DirectOutputThread::threadLoop() { - mixer_state mixerStatus = MIXER_IDLE; sp trackToRemove; sp activeTrack; nsecs_t standbyTime = systemTime(); @@ -2703,8 +2701,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() processConfigEvents(); - mixerStatus = MIXER_IDLE; - + mixer_state mixerStatus = MIXER_IDLE; { // scope for the mLock Mutex::Autolock _l(mLock); @@ -3077,7 +3074,6 @@ AudioFlinger::DuplicatingThread::~DuplicatingThread() bool AudioFlinger::DuplicatingThread::threadLoop() { Vector< sp > tracksToRemove; - mixer_state mixerStatus = MIXER_IDLE; nsecs_t standbyTime = systemTime(); size_t mixBufferSize = mFrameCount*mFrameSize; SortedVector< sp > outputTracks; @@ -3093,7 +3089,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop() { processConfigEvents(); - mixerStatus = MIXER_IDLE; + mixer_state mixerStatus = MIXER_IDLE; { // scope for the mLock Mutex::Autolock _l(mLock); -- cgit v1.1