summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-25 14:28:29 -0800
committerGlenn Kasten <gkasten@google.com>2012-02-08 10:24:54 -0800
commit803a86a546ad6fac006730a8eae52869021ef125 (patch)
tree81ce2123f98ec4342f36bbefe315c4ecaf7e198f /services/audioflinger/AudioFlinger.h
parent8e0cc398e348f2c75498f813560bc73be6640371 (diff)
downloadframeworks_base-803a86a546ad6fac006730a8eae52869021ef125.zip
frameworks_base-803a86a546ad6fac006730a8eae52869021ef125.tar.gz
frameworks_base-803a86a546ad6fac006730a8eae52869021ef125.tar.bz2
Combine duplicate code & document wp<> in mClients
Change-Id: Iea8cfe8e57563337fb2484a1246ef79d6ad3db18
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index dac9986..97103c4 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -1231,7 +1231,7 @@ mutable Mutex mLock; // mutex for process, commands and handl
sp<EffectModule> mEffect; // pointer to controlled EffectModule
sp<IEffectClient> mEffectClient; // callback interface for client notifications
- sp<Client> mClient; // client for shared memory allocation
+ /*const*/ sp<Client> mClient; // client for shared memory allocation, see disconnect()
sp<IMemory> mCblkMemory; // shared memory for control block
effect_param_cblk_t* mCblk; // control block for deferred parameter setting via shared memory
uint8_t* mBuffer; // pointer to parameter area in shared memory
@@ -1403,7 +1403,7 @@ mutable Mutex mLock; // mutex for process, commands and handl
mutable Mutex mLock;
- DefaultKeyedVector< pid_t, wp<Client> > mClients;
+ DefaultKeyedVector< pid_t, wp<Client> > mClients; // see ~Client()
mutable Mutex mHardwareLock;
audio_hw_device_t* mPrimaryHardwareDev;
@@ -1429,6 +1429,10 @@ mutable Mutex mLock; // mutex for process, commands and handl
float masterVolume_l() const { return mMasterVolume; }
bool masterMute_l() const { return mMasterMute; }
+
+private:
+ sp<Client> registerPid_l(pid_t pid); // always returns non-0
+
};