Skip to content

Commit 9778bd1

Browse files
gkastenAndroid (Google) Code Review
authored andcommitted
Merge "Make applyVolume private to DirectOutputThread"
2 parents eeaff65 + e012783 commit 9778bd1

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
@@ -1028,7 +1028,6 @@ class AudioFlinger :
10281028
virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove);
10291029
virtual void threadLoop_mix();
10301030
virtual void threadLoop_sleepTime();
1031-
virtual void applyVolume();
10321031

10331032
// volumes last sent to audio HAL with stream->set_volume()
10341033
// FIXME use standard representation and names
@@ -1042,6 +1041,9 @@ class AudioFlinger :
10421041
bool rampVolume;
10431042
uint16_t leftVol;
10441043
uint16_t rightVol;
1044+
1045+
private:
1046+
void applyVolume(); // FIXME inline into threadLoop_mix()
10451047
};
10461048

10471049
class DuplicatingThread : public MixerThread {

0 commit comments

Comments
 (0)