Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
播放音乐是单声道,硬件用的是双声道。
AudioFlinger::PlaybackThread::Track::Track ->
thread->getTrackName_l ->
AudioMixer::getTrackName ->
t->channelCount = audio_channel_count_from_out_mask(channelMask)
t->channelMask = channelMask;
t->prepareForDownmix
status_t AudioMixer::track_t::prepareForDownmix()
{
......
// 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
&& mMixerChannelMask == AUDIO_CHANNEL_OUT_STEREO)) {
return NO_ERROR;
}
......
// Effect downmixer does not accept the channel conversion. Let's use our remixer.
RemixBufferProvider