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

Unified Diff: media/filters/audio_renderer_impl.cc

Issue 315593004: Merge 274068 "Always use the source channel layout with AudioBuf..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.cc
===================================================================
--- media/filters/audio_renderer_impl.cc (revision 274565)
+++ media/filters/audio_renderer_impl.cc (working copy)
@@ -274,13 +274,19 @@
} else {
// TODO(rileya): Support hardware config changes
const AudioParameters& hw_params = hardware_config_->GetOutputConfig();
- audio_parameters_.Reset(hw_params.format(),
- hw_params.channel_layout(),
- hw_params.channels(),
- hw_params.input_channels(),
- hw_params.sample_rate(),
- hw_params.bits_per_sample(),
- hardware_config_->GetHighLatencyBufferSize());
+ audio_parameters_.Reset(
+ hw_params.format(),
+ // Always use the source's channel layout and channel count to avoid
+ // premature downmixing (http://crbug.com/379288), platform specific
+ // issues around channel layouts (http://crbug.com/266674), and
+ // unnecessary upmixing overhead.
+ stream->audio_decoder_config().channel_layout(),
+ ChannelLayoutToChannelCount(
+ stream->audio_decoder_config().channel_layout()),
+ hw_params.input_channels(),
+ hw_params.sample_rate(),
+ hw_params.bits_per_sample(),
+ hardware_config_->GetHighLatencyBufferSize());
}
audio_clock_.reset(new AudioClock(audio_parameters_.sample_rate()));
« no previous file with comments | « no previous file | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698