diff options
author | Glenn Kasten <gkasten@google.com> | 2012-03-07 10:44:29 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-07 10:44:29 -0800 |
commit | 9778bd1f33a28f3f403a93ba195121c3d03fb266 (patch) | |
tree | cfe29f29ed619326e4bd9101e48f8fdc141d5197 /services/audioflinger | |
parent | eeaff65bf03c91d08362f917c60052da2352ecb4 (diff) | |
parent | e012783db87815fab07c91b8f1faff3e2d7dbd3c (diff) | |
download | frameworks_base-9778bd1f33a28f3f403a93ba195121c3d03fb266.zip frameworks_base-9778bd1f33a28f3f403a93ba195121c3d03fb266.tar.gz frameworks_base-9778bd1f33a28f3f403a93ba195121c3d03fb266.tar.bz2 |
Merge "Make applyVolume private to DirectOutputThread"
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 9 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 8deb2fe..fe068af 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -2166,14 +2166,6 @@ if (mType == DIRECT) { // only process effects if we're going to write if (sleepTime == 0) { - - if (mixerStatus == MIXER_TRACKS_READY) { - - // Non-trivial for DIRECT only - applyVolume(); - - } - for (size_t i = 0; i < effectChains.size(); i ++) { effectChains[i]->process_l(); } @@ -2999,6 +2991,7 @@ void AudioFlinger::DirectOutputThread::threadLoop_mix() } sleepTime = 0; standbyTime = systemTime() + standbyDelay; + applyVolume(); } void AudioFlinger::DirectOutputThread::threadLoop_sleepTime() diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 11ac52b..8ca4f89 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -1028,7 +1028,6 @@ public: virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove); virtual void threadLoop_mix(); virtual void threadLoop_sleepTime(); - virtual void applyVolume(); // volumes last sent to audio HAL with stream->set_volume() // FIXME use standard representation and names @@ -1042,6 +1041,9 @@ public: bool rampVolume; uint16_t leftVol; uint16_t rightVol; + +private: + void applyVolume(); // FIXME inline into threadLoop_mix() }; class DuplicatingThread : public MixerThread { |