summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-24 07:25:40 -0800
committerGlenn Kasten <gkasten@google.com>2012-02-24 16:14:46 -0800
commit5d4eeeaf76ebe177b43e87b2a9df5e55e39021f0 (patch)
treef27b737f2e5dad2ac6c04ae0294f121a47210aec /services
parentd6fd85a157ce2054b2304e6d171fa87ae09c363d (diff)
downloadframeworks_av-5d4eeeaf76ebe177b43e87b2a9df5e55e39021f0.zip
frameworks_av-5d4eeeaf76ebe177b43e87b2a9df5e55e39021f0.tar.gz
frameworks_av-5d4eeeaf76ebe177b43e87b2a9df5e55e39021f0.tar.bz2
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
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp10
1 files changed, 3 insertions, 7 deletions
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<Track> > 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<Track> trackToRemove;
sp<Track> 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<Track> > tracksToRemove;
- mixer_state mixerStatus = MIXER_IDLE;
nsecs_t standbyTime = systemTime();
size_t mixBufferSize = mFrameCount*mFrameSize;
SortedVector< sp<OutputTrack> > 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);