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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 1304973005: Refactor AudioParameters member setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dalecurtis comments. Created 5 years, 3 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
« media/audio/audio_parameters.h ('K') | « media/cast/test/fake_media_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index 8df794155ad5bbd8a224c6ff808792e84d5e0f61..e1eae0651647f67a207793804a79071f3f0a3a05 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -343,8 +343,6 @@ void AudioRendererImpl::Initialize(
audio_parameters_.Reset(
AudioParameters::AUDIO_PCM_LOW_LATENCY,
stream->audio_decoder_config().channel_layout(),
- ChannelLayoutToChannelCount(
- stream->audio_decoder_config().channel_layout()),
stream->audio_decoder_config().samples_per_second(),
stream->audio_decoder_config().bits_per_channel(),
buffer_size);
@@ -352,15 +350,11 @@ void AudioRendererImpl::Initialize(
} else {
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.
+ // Always use the source's channel layout 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.sample_rate(),
- hw_params.bits_per_sample(),
+ hw_params.sample_rate(), hw_params.bits_per_sample(),
hardware_config_.GetHighLatencyBufferSize());
}
« media/audio/audio_parameters.h ('K') | « media/cast/test/fake_media_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698