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

Unified Diff: media/filters/audio_renderer_impl.cc

Issue 304233006: Always use the source channel layout with AudioBufferConverter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.cc
diff --git a/media/filters/audio_renderer_impl.cc b/media/filters/audio_renderer_impl.cc
index 0dff76f37d7f3a222a30befb0bb057ee54f66d6c..16e3b44d1c03c50797381b5f237fc4d03ef4f9c1 100644
--- a/media/filters/audio_renderer_impl.cc
+++ b/media/filters/audio_renderer_impl.cc
@@ -283,13 +283,18 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
} 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(),
+ // To avoid unnecessary upmixing and platform specific issues around
+ // channel layouts (http://crbug.com/266674) only allow channel down
wolenetz 2014/05/30 23:01:00 nit: Upmixing is still allowed, but to no higher t
DaleCurtis 2014/05/30 23:08:57 Done.
+ // mixing within the AudioBufferConverter.
+ 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698