Skip to content

Commit e012783

Browse files
committed
Make applyVolume private to DirectOutputThread
Change-Id: I7ca4a59505857cbd106b6f274c66e9580dead271
1 parent 761415b commit e012783

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

services/audioflinger/AudioFlinger.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,14 +2166,6 @@ if (mType == DIRECT) {
21662166

21672167
// only process effects if we're going to write
21682168
if (sleepTime == 0) {
2169-
2170-
if (mixerStatus == MIXER_TRACKS_READY) {
2171-
2172-
// Non-trivial for DIRECT only
2173-
applyVolume();
2174-
2175-
}
2176-
21772169
for (size_t i = 0; i < effectChains.size(); i ++) {
21782170
effectChains[i]->process_l();
21792171
}
@@ -2999,6 +2991,7 @@ void AudioFlinger::DirectOutputThread::threadLoop_mix()
29992991
}
30002992
sleepTime = 0;
30012993
standbyTime = systemTime() + standbyDelay;
2994+
applyVolume();
30022995
}
30032996

30042997
void AudioFlinger::DirectOutputThread::threadLoop_sleepTime()

services/audioflinger/AudioFlinger.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,6 @@ class AudioFlinger :
10041004
virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove);
10051005
virtual void threadLoop_mix();
10061006
virtual void threadLoop_sleepTime();
1007-
virtual void applyVolume();
10081007

10091008
// volumes last sent to audio HAL with stream->set_volume()
10101009
// FIXME use standard representation and names
@@ -1018,6 +1017,9 @@ class AudioFlinger :
10181017
bool rampVolume;
10191018
uint16_t leftVol;
10201019
uint16_t rightVol;
1020+
1021+
private:
1022+
void applyVolume(); // FIXME inline into threadLoop_mix()
10211023
};
10221024

10231025
class DuplicatingThread : public MixerThread {

0 commit comments

Comments
 (0)