Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2016)

Unified Diff: content/renderer/media/audio_renderer_mixer_manager.cc

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: +pipeline integration tests, +test media, minor fixes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/audio_renderer_mixer_manager.cc
diff --git a/content/renderer/media/audio_renderer_mixer_manager.cc b/content/renderer/media/audio_renderer_mixer_manager.cc
index f22bdc3f6d7c94d38cff3ee3f6ac4e05466c47ac..03b5fe86820095cda9a96fcbf29f813243d0fa49 100644
--- a/content/renderer/media/audio_renderer_mixer_manager.cc
+++ b/content/renderer/media/audio_renderer_mixer_manager.cc
@@ -70,10 +70,17 @@ media::AudioParameters GetMixerOutputParams(
DCHECK_NE(output_buffer_size, 0);
+ // If the input has discrete channel layout, the hardware channel mapping is
+ // unknown. Default to the hardware channel layout instead. Any input
+ // channels beyond the hardware channel count will not be played out.
+ media::ChannelLayout channel_layout =
+ input_params.channel_layout() == media::CHANNEL_LAYOUT_DISCRETE
+ ? hardware_params.channel_layout()
+ : input_params.channel_layout();
+
DaleCurtis 2017/03/31 19:06:53 Needs set_channels.
flim-chromium 2017/04/05 18:19:34 I ended up removing this.
// Force to 16-bit output for now since we know that works everywhere;
// ChromeOS does not support other bit depths.
- media::AudioParameters params(input_params.format(),
- input_params.channel_layout(),
+ media::AudioParameters params(input_params.format(), channel_layout,
output_sample_rate, 16, output_buffer_size);
// Specify the latency info to be passed to the browser side.

Powered by Google App Engine
This is Rietveld 408576698