summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-07-02 16:11:18 -0700
committerGlenn Kasten <gkasten@google.com>2012-07-03 10:18:11 -0700
commit415fa7599f48494f99206b8d6e1974abb52c5923 (patch)
tree3cfdad6a05f9bece6cefc1bcaffc4f0a81f577c8 /services/audioflinger/AudioFlinger.cpp
parentd5903ec1332630f2992a6f0d5ca69d13a185c665 (diff)
downloadframeworks_av-415fa7599f48494f99206b8d6e1974abb52c5923.zip
frameworks_av-415fa7599f48494f99206b8d6e1974abb52c5923.tar.gz
frameworks_av-415fa7599f48494f99206b8d6e1974abb52c5923.tar.bz2
Fix uninitialized field EffectModule::mPinned
Also mark EffectModule::mId and EffectModule::mSessionId const, and document the initialization of other fields in EffectModule. Change-Id: Ic1ca008e75e9b5924743ffc35bef80057f3a0669
Diffstat (limited to 'services/audioflinger/AudioFlinger.cpp')
-rw-r--r--services/audioflinger/AudioFlinger.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index f410a6f..540c9a3 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -7992,8 +7992,15 @@ AudioFlinger::EffectModule::EffectModule(ThreadBase *thread,
effect_descriptor_t *desc,
int id,
int sessionId)
- : mThread(thread), mChain(chain), mId(id), mSessionId(sessionId), mEffectInterface(NULL),
- mStatus(NO_INIT), mState(IDLE), mSuspended(false)
+ : mPinned(sessionId > AUDIO_SESSION_OUTPUT_MIX),
+ mThread(thread), mChain(chain), mId(id), mSessionId(sessionId),
+ // mDescriptor is set below
+ // mConfig is set by configure() and not used before then
+ mEffectInterface(NULL),
+ mStatus(NO_INIT), mState(IDLE),
+ // mMaxDisableWaitCnt is set by configure() and not used before then
+ // mDisableWaitCnt is set by process() and updateState() and not used before then
+ mSuspended(false)
{
ALOGV("Constructor %p", this);
int lStatus;
@@ -8015,9 +8022,6 @@ AudioFlinger::EffectModule::EffectModule(ThreadBase *thread,
goto Error;
}
- if (mSessionId > AUDIO_SESSION_OUTPUT_MIX) {
- mPinned = true;
- }
ALOGV("Constructor success name %s, Interface %p", mDescriptor.name, mEffectInterface);
return;
Error: