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

Unified Diff: media/filters/null_audio_renderer.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/null_audio_renderer.h ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/null_audio_renderer.cc
diff --git a/media/filters/null_audio_renderer.cc b/media/filters/null_audio_renderer.cc
index 21b3e07d7081add8397f39b37e2da0dd040365c0..0d5daf59599e8c74fe863798adf3000b2eb93669 100644
--- a/media/filters/null_audio_renderer.cc
+++ b/media/filters/null_audio_renderer.cc
@@ -60,11 +60,13 @@ void NullAudioRenderer::ThreadMain() {
}
}
-bool NullAudioRenderer::OnInitialize(const AudioDecoderConfig& config) {
+bool NullAudioRenderer::OnInitialize(int bits_per_channel,
+ ChannelLayout channel_layout,
+ int sample_rate) {
// Calculate our bytes per millisecond value and allocate our buffer.
bytes_per_millisecond_ =
- (ChannelLayoutToChannelCount(config.channel_layout) * config.sample_rate *
- config.bits_per_channel / 8) / base::Time::kMillisecondsPerSecond;
+ (ChannelLayoutToChannelCount(channel_layout) * sample_rate *
+ bits_per_channel / 8) / base::Time::kMillisecondsPerSecond;
buffer_size_ = bytes_per_millisecond_ * kBufferSizeInMilliseconds;
buffer_.reset(new uint8[buffer_size_]);
DCHECK(buffer_.get());
« no previous file with comments | « media/filters/null_audio_renderer.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698