summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-04-22 19:16:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-22 19:16:16 +0000
commit20bd9bfc3ae429412c8eb98619b40fb8e3671bbc (patch)
treefd3901e733e87aeac5ec506070f66a2702c30a7c
parent983f2e02b342ef3ac4004471cbfd4cd8d5aecf7d (diff)
parent73e62e2ea12e46825958eba718bd8d5e23064ec5 (diff)
downloadframeworks_av-20bd9bfc3ae429412c8eb98619b40fb8e3671bbc.zip
frameworks_av-20bd9bfc3ae429412c8eb98619b40fb8e3671bbc.tar.gz
frameworks_av-20bd9bfc3ae429412c8eb98619b40fb8e3671bbc.tar.bz2
Merge "Fix single channel playback that does not use AUDIO_CHANNEL_OUT_MONO"
-rw-r--r--services/audioflinger/AudioMixer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 18ce1d0..7040af4 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -317,7 +317,7 @@ status_t AudioMixer::track_t::prepareForDownmix()
// discard the previous downmixer if there was one
unprepareForDownmix();
- // Only remix (upmix or downmix) if the track and mixer/device channel masks
+ // MONO_HACK Only remix (upmix or downmix) if the track and mixer/device channel masks
// are not the same and not handled internally, as mono -> stereo currently is.
if (channelMask == mMixerChannelMask
|| (channelMask == AUDIO_CHANNEL_OUT_MONO
@@ -920,7 +920,8 @@ void AudioMixer::process__validate(state_t* state, int64_t pts)
} else {
if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_1){
t.hook = getTrackHook(
- t.mMixerChannelCount == 2 // TODO: MONO_HACK.
+ (t.mMixerChannelMask == AUDIO_CHANNEL_OUT_STEREO // TODO: MONO_HACK
+ && t.channelMask == AUDIO_CHANNEL_OUT_MONO)
? TRACKTYPE_NORESAMPLEMONO : TRACKTYPE_NORESAMPLE,
t.mMixerChannelCount,
t.mMixerInFormat, t.mMixerFormat);