Commit c2f49453 authored by Sergey Volk's avatar Sergey Volk Committed by Commit Bot

Fix channel layout config for multi-channel Opus encoded audio

Test: Played 5.1 opus encoded audio file through chromecast by pointing the chromecast to a local server and audio comes out of the AVR at the expected channel.
Bug: b/133189747
Change-Id: Ia0e77ea9f6f8b3f9cd35803dffa5888fec0335d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627759Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Sergey Volk <servolk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664079}
parent 99181c0b
......@@ -113,6 +113,7 @@ bool AudioDecoderSoftwareWrapper::SetConfig(const AudioConfig& config) {
output_config_.bytes_per_channel = 2;
output_config_.samples_per_second = config.samples_per_second;
output_config_.encryption_scheme = EncryptionScheme::kUnencrypted;
output_config_.channel_layout = config.channel_layout;
return backend_decoder_->SetConfig(output_config_);
}
......
......@@ -55,6 +55,7 @@ ChannelLayout ToChannelLayout(const ::media::ChannelLayout channel_layout) {
case ::media::ChannelLayout::CHANNEL_LAYOUT_STEREO:
return ChannelLayout::STEREO;
case ::media::ChannelLayout::CHANNEL_LAYOUT_5_1:
case ::media::ChannelLayout::CHANNEL_LAYOUT_5_1_BACK:
return ChannelLayout::SURROUND_5_1;
case ::media::ChannelLayout::CHANNEL_LAYOUT_BITSTREAM:
return ChannelLayout::BITSTREAM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment