Loading services/audioflinger/AudioFlinger.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -646,12 +646,14 @@ status_t AudioFlinger::setMasterMute(bool muted) float AudioFlinger::masterVolume() const { return mMasterVolume; Mutex::Autolock _l(mLock); return masterVolume_l(); } bool AudioFlinger::masterMute() const { return mMasterMute; Mutex::Autolock _l(mLock); return masterMute_l(); } status_t AudioFlinger::setStreamVolume(audio_stream_type_t stream, float value, int output) Loading Loading @@ -1379,8 +1381,10 @@ AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinge readOutputParameters(); mMasterVolume = mAudioFlinger->masterVolume(); mMasterMute = mAudioFlinger->masterMute(); // Assumes constructor is called by AudioFlinger with it's mLock held, // but it would be safer to explicitly pass these as parameters mMasterVolume = mAudioFlinger->masterVolume_l(); mMasterMute = mAudioFlinger->masterMute_l(); // There is no AUDIO_STREAM_MIN, and ++ operator does not compile for (audio_stream_type_t stream = (audio_stream_type_t) 0; stream < AUDIO_STREAM_CNT; Loading services/audioflinger/AudioFlinger.h +7 −0 Original line number Diff line number Diff line Loading @@ -765,7 +765,9 @@ private: int16_t* mMixBuffer; int mSuspended; int mBytesWritten; private: bool mMasterMute; protected: SortedVector< wp<Track> > mActiveTracks; virtual int getTrackName_l() = 0; Loading Loading @@ -1388,6 +1390,8 @@ mutable Mutex mLock; // mutex for process, commands and handl DefaultKeyedVector< int, sp<PlaybackThread> > mPlaybackThreads; PlaybackThread::stream_type_t mStreamTypes[AUDIO_STREAM_CNT]; // both are protected by mLock float mMasterVolume; bool mMasterMute; Loading @@ -1399,6 +1403,9 @@ mutable Mutex mLock; // mutex for process, commands and handl bool mBtNrecIsOff; Vector<AudioSessionRef*> mAudioSessionRefs; float masterVolume_l() const { return mMasterVolume; } bool masterMute_l() const { return mMasterMute; } }; Loading Loading
services/audioflinger/AudioFlinger.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -646,12 +646,14 @@ status_t AudioFlinger::setMasterMute(bool muted) float AudioFlinger::masterVolume() const { return mMasterVolume; Mutex::Autolock _l(mLock); return masterVolume_l(); } bool AudioFlinger::masterMute() const { return mMasterMute; Mutex::Autolock _l(mLock); return masterMute_l(); } status_t AudioFlinger::setStreamVolume(audio_stream_type_t stream, float value, int output) Loading Loading @@ -1379,8 +1381,10 @@ AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinge readOutputParameters(); mMasterVolume = mAudioFlinger->masterVolume(); mMasterMute = mAudioFlinger->masterMute(); // Assumes constructor is called by AudioFlinger with it's mLock held, // but it would be safer to explicitly pass these as parameters mMasterVolume = mAudioFlinger->masterVolume_l(); mMasterMute = mAudioFlinger->masterMute_l(); // There is no AUDIO_STREAM_MIN, and ++ operator does not compile for (audio_stream_type_t stream = (audio_stream_type_t) 0; stream < AUDIO_STREAM_CNT; Loading
services/audioflinger/AudioFlinger.h +7 −0 Original line number Diff line number Diff line Loading @@ -765,7 +765,9 @@ private: int16_t* mMixBuffer; int mSuspended; int mBytesWritten; private: bool mMasterMute; protected: SortedVector< wp<Track> > mActiveTracks; virtual int getTrackName_l() = 0; Loading Loading @@ -1388,6 +1390,8 @@ mutable Mutex mLock; // mutex for process, commands and handl DefaultKeyedVector< int, sp<PlaybackThread> > mPlaybackThreads; PlaybackThread::stream_type_t mStreamTypes[AUDIO_STREAM_CNT]; // both are protected by mLock float mMasterVolume; bool mMasterMute; Loading @@ -1399,6 +1403,9 @@ mutable Mutex mLock; // mutex for process, commands and handl bool mBtNrecIsOff; Vector<AudioSessionRef*> mAudioSessionRefs; float masterVolume_l() const { return mMasterVolume; } bool masterMute_l() const { return mMasterMute; } }; Loading