Bug 1567949 - Pass in a well known channel mapping based on the number of channels to cubeb in AudioCallbackDriver. r=pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D50061

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paul Adenot 2019-11-19 18:23:21 +00:00
Родитель 9bd3a762c3
Коммит 471e5e9c8f
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -580,7 +580,10 @@ bool AudioCallbackDriver::Init() {
SpillBuffer<AudioDataValue, WEBAUDIO_BLOCK_SIZE * 2>(mOutputChannels);
output.channels = mOutputChannels;
output.layout = CUBEB_LAYOUT_UNDEFINED;
AudioConfig::ChannelLayout::ChannelMap channelMap =
AudioConfig::ChannelLayout(mOutputChannels).Map();
output.layout = static_cast<uint32_t>(channelMap);
output.prefs = CubebUtils::GetDefaultStreamPrefs();
#if !defined(XP_WIN)
if (mInputDevicePreference == CUBEB_DEVICE_PREF_VOICE) {