summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-08-02 13:37:12 -0700
committerGlenn Kasten <gkasten@google.com>2012-08-13 11:38:18 -0700
commit106e8a42038f9e90d5ff97f8ab6f1a42258bde9e (patch)
treeaf631b5e756cf711d5d9d34db2dffe02cf64e7e3 /services/audioflinger/AudioFlinger.h
parent0dbb356050d0db9e0043dd43045c1864a933332b (diff)
downloadframeworks_av-106e8a42038f9e90d5ff97f8ab6f1a42258bde9e.zip
frameworks_av-106e8a42038f9e90d5ff97f8ab6f1a42258bde9e.tar.gz
frameworks_av-106e8a42038f9e90d5ff97f8ab6f1a42258bde9e.tar.bz2
const methods
Change-Id: I92e32ee16274c032c9d0ce910676be2a7fa52471
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index e5176a9..682d61d 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -233,8 +233,8 @@ public:
virtual ~SyncEvent() {}
void trigger() { Mutex::Autolock _l(mLock); if (mCallback) mCallback(this); }
- bool isCancelled() { Mutex::Autolock _l(mLock); return (mCallback == NULL); }
- void cancel() {Mutex::Autolock _l(mLock); mCallback = NULL; }
+ bool isCancelled() const { Mutex::Autolock _l(mLock); return (mCallback == NULL); }
+ void cancel() { Mutex::Autolock _l(mLock); mCallback = NULL; }
AudioSystem::sync_event_t type() const { return mType; }
int triggerSession() const { return mTriggerSession; }
int listenerSession() const { return mListenerSession; }
@@ -246,7 +246,7 @@ public:
const int mListenerSession;
sync_event_callback_t mCallback;
void * const mCookie;
- Mutex mLock;
+ mutable Mutex mLock;
};
sp<SyncEvent> createSyncEvent(AudioSystem::sync_event_t type,
@@ -547,7 +547,7 @@ private:
// get effect chain corresponding to session Id.
sp<EffectChain> getEffectChain(int sessionId);
// same as getEffectChain() but must be called with ThreadBase mutex locked
- sp<EffectChain> getEffectChain_l(int sessionId);
+ sp<EffectChain> getEffectChain_l(int sessionId) const;
// add an effect chain to the chain list (mEffectChains)
virtual status_t addEffectChain_l(const sp<EffectChain>& chain) = 0;
// remove an effect chain from the chain list (mEffectChains)
@@ -574,7 +574,7 @@ private:
virtual void detachAuxEffect_l(int effectId) {}
// returns either EFFECT_SESSION if effects on this audio session exist in one
// chain, or TRACK_SESSION if tracks on this audio session exist, or both
- virtual uint32_t hasAudioSession(int sessionId) = 0;
+ virtual uint32_t hasAudioSession(int sessionId) const = 0;
// the value returned by default implementation is not important as the
// strategy is only meaningful for PlaybackThread which implements this method
virtual uint32_t getStrategyForSession_l(int sessionId) { return 0; }
@@ -594,7 +594,7 @@ private:
int sessionId = AUDIO_SESSION_OUTPUT_MIX);
virtual status_t setSyncEvent(const sp<SyncEvent>& event) = 0;
- virtual bool isValidSyncEvent(const sp<SyncEvent>& event) = 0;
+ virtual bool isValidSyncEvent(const sp<SyncEvent>& event) const = 0;
mutable Mutex mLock;
@@ -1050,12 +1050,12 @@ public:
virtual status_t addEffectChain_l(const sp<EffectChain>& chain);
virtual size_t removeEffectChain_l(const sp<EffectChain>& chain);
- virtual uint32_t hasAudioSession(int sessionId);
+ virtual uint32_t hasAudioSession(int sessionId) const;
virtual uint32_t getStrategyForSession_l(int sessionId);
virtual status_t setSyncEvent(const sp<SyncEvent>& event);
- virtual bool isValidSyncEvent(const sp<SyncEvent>& event);
+ virtual bool isValidSyncEvent(const sp<SyncEvent>& event) const;
void invalidateTracks(audio_stream_type_t streamType);
@@ -1463,15 +1463,15 @@ private:
virtual status_t addEffectChain_l(const sp<EffectChain>& chain);
virtual size_t removeEffectChain_l(const sp<EffectChain>& chain);
- virtual uint32_t hasAudioSession(int sessionId);
+ virtual uint32_t hasAudioSession(int sessionId) const;
// Return the set of unique session IDs across all tracks.
// The keys are the session IDs, and the associated values are meaningless.
// FIXME replace by Set [and implement Bag/Multiset for other uses].
- KeyedVector<int, bool> sessionIds();
+ KeyedVector<int, bool> sessionIds() const;
virtual status_t setSyncEvent(const sp<SyncEvent>& event);
- virtual bool isValidSyncEvent(const sp<SyncEvent>& event);
+ virtual bool isValidSyncEvent(const sp<SyncEvent>& event) const;
static void syncStartEventCallback(const wp<SyncEvent>& event);
void handleSyncStartEvent(const sp<SyncEvent>& event);