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

Unified Diff: media/filters/audio_renderer_algorithm_base.cc

Issue 150140: Minor changes to ARAB and ARAD necessary for OLA (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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_algorithm_base.h ('k') | media/filters/audio_renderer_algorithm_default.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_algorithm_base.cc
===================================================================
--- media/filters/audio_renderer_algorithm_base.cc (revision 19669)
+++ media/filters/audio_renderer_algorithm_base.cc (working copy)
@@ -4,6 +4,8 @@
#include "media/filters/audio_renderer_algorithm_base.h"
+#include "media/base/buffers.h"
+
namespace media {
// The maximum size of the queue, which also acts as the number of initial reads
@@ -17,26 +19,24 @@
AudioRendererAlgorithmBase::AudioRendererAlgorithmBase()
: channels_(0),
- sample_rate_(0),
- sample_bits_(0),
+ sample_bytes_(0),
playback_rate_(0.0f) {
}
AudioRendererAlgorithmBase::~AudioRendererAlgorithmBase() {}
void AudioRendererAlgorithmBase::Initialize(int channels,
- int sample_rate,
int sample_bits,
float initial_playback_rate,
RequestReadCallback* callback) {
DCHECK_GT(channels, 0);
- DCHECK_GT(sample_rate, 0);
DCHECK_GT(sample_bits, 0);
DCHECK(callback);
+ // We only support 8, 16, 32 bit audio.
+ DCHECK_EQ(sample_bits % 8, 0)
channels_ = channels;
- sample_rate_ = sample_rate;
- sample_bits_ = sample_bits;
+ sample_bytes_ = sample_bits / 8;
fbarchard 2009/06/30 23:42:18 More of a nit/FYI... As these are signed integers,
request_read_callback_.reset(callback);
set_playback_rate(initial_playback_rate);
@@ -84,12 +84,8 @@
return channels_;
}
-int AudioRendererAlgorithmBase::sample_rate() {
- return sample_rate_;
+int AudioRendererAlgorithmBase::sample_bytes() {
+ return sample_bytes_;
}
-int AudioRendererAlgorithmBase::sample_bits() {
- return sample_bits_;
-}
-
} // namespace media
« no previous file with comments | « media/filters/audio_renderer_algorithm_base.h ('k') | media/filters/audio_renderer_algorithm_default.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698