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

Unified Diff: media/filters/audio_renderer_base.cc

Issue 7796033: Replace AudioDecoderConfig with simple accessors on AudioDecoder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 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
« no previous file with comments | « media/filters/audio_renderer_base.h ('k') | media/filters/audio_renderer_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_base.cc
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
index 2d6205effb5958a2c2fef33a338a06e9bbc676a4..f64f13fe1583e52df0a5ce87021e7de204ce5f9c 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -104,15 +104,14 @@ void AudioRendererBase::Initialize(AudioDecoder* decoder,
// Initialize our algorithm with media properties, initial playback rate,
// and a callback to request more reads from the data source.
- AudioDecoderConfig config = decoder_->config();
- algorithm_->Initialize(ChannelLayoutToChannelCount(config.channel_layout),
- config.sample_rate,
- config.bits_per_channel,
- 0.0f,
- cb);
+ ChannelLayout channel_layout = decoder_->channel_layout();
+ int channels = ChannelLayoutToChannelCount(channel_layout);
+ int bits_per_channel = decoder_->bits_per_channel();
+ int sample_rate = decoder_->sample_rate();
+ algorithm_->Initialize(channels, sample_rate, bits_per_channel, 0.0f, cb);
// Give the subclass an opportunity to initialize itself.
- if (!OnInitialize(config)) {
+ if (!OnInitialize(bits_per_channel, channel_layout, sample_rate)) {
host()->SetError(PIPELINE_ERROR_INITIALIZATION_FAILED);
callback->Run();
return;
« no previous file with comments | « media/filters/audio_renderer_base.h ('k') | media/filters/audio_renderer_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698