diff options
author | Glenn Kasten <gkasten@google.com> | 2012-02-14 09:42:32 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-14 09:42:32 -0800 |
commit | d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71 (patch) | |
tree | e2b8666cc7ca81254ce264129ddd70c076a63ed1 /services/audioflinger/AudioFlinger.h | |
parent | ed15977476a3d53103866e6d527fa3fb65d4166c (diff) | |
parent | 99e53b86eebb605b70dd7591b89bf61a9414ed0e (diff) | |
download | frameworks_av-d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71.zip frameworks_av-d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71.tar.gz frameworks_av-d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71.tar.bz2 |
Merge "Update comments"
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index aa0ee76..48a23fa 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -1,4 +1,4 @@ -/* //device/include/server/AudioFlinger/AudioFlinger.h +/* ** ** Copyright 2007, The Android Open Source Project ** @@ -290,6 +290,8 @@ private: enum track_state { IDLE, TERMINATED, + // These are order-sensitive; do not change order without reviewing the impact. + // In particular there are assumptions about > STOPPED. STOPPED, RESUMING, ACTIVE, @@ -760,6 +762,9 @@ private: int mSuspended; int mBytesWritten; private: + // mMasterMute is in both PlaybackThread and in AudioFlinger. When a + // PlaybackThread needs to find out if master-muted, it checks it's local + // copy rather than the one in AudioFlinger. This optimization saves a lock. bool mMasterMute; protected: SortedVector< wp<Track> > mActiveTracks; @@ -853,6 +858,8 @@ private: private: void applyVolume(uint16_t leftVol, uint16_t rightVol, bool ramp); + // volumes last sent to audio HAL with stream->set_volume() + // FIXME use standard representation and names float mLeftVolFloat; float mRightVolFloat; uint16_t mLeftVolShort; @@ -900,6 +907,7 @@ private: friend class AudioBuffer; + // server side of the client's IAudioTrack class TrackHandle : public android::BnAudioTrack { public: TrackHandle(const sp<PlaybackThread::Track>& track); @@ -1024,6 +1032,7 @@ private: ssize_t mBytesRead; }; + // server side of the client's IAudioRecord class RecordHandle : public android::BnAudioRecord { public: RecordHandle(const sp<RecordThread::RecordTrack>& recordTrack); @@ -1152,6 +1161,7 @@ mutable Mutex mLock; // mutex for process, commands and handl status_t mStatus; // initialization status effect_state mState; // current activation state Vector< wp<EffectHandle> > mHandles; // list of client handles + // First handle in mHandles has highest priority and controls the effect module uint32_t mMaxDisableWaitCnt; // maximum grace period before forcing an effect off after // sending disable command. uint32_t mDisableWaitCnt; // current process() calls count during disable period. @@ -1377,6 +1387,7 @@ mutable Mutex mLock; // mutex for process, commands and handl hwDev(dev), stream(in) {} }; + // for mAudioSessionRefs only struct AudioSessionRef { // FIXME rename parameter names when fields get "m" prefix AudioSessionRef(int sessionid_, pid_t pid_) : @@ -1432,10 +1443,11 @@ mutable Mutex mLock; // mutex for process, commands and handl DefaultKeyedVector< audio_io_handle_t, sp<RecordThread> > mRecordThreads; DefaultKeyedVector< pid_t, sp<NotificationClient> > mNotificationClients; - volatile int32_t mNextUniqueId; + volatile int32_t mNextUniqueId; // updated by android_atomic_inc audio_mode_t mMode; bool mBtNrecIsOff; + // protected by mLock Vector<AudioSessionRef*> mAudioSessionRefs; float masterVolume_l() const { return mMasterVolume; } |