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

Unified Diff: media/filters/audio_renderer_impl.cc

Issue 155695: Replace the guts of AudioRendererBase with calls to scaling algorithm. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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_impl.h ('k') | media/filters/null_audio_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.cc
===================================================================
--- media/filters/audio_renderer_impl.cc (revision 22189)
+++ media/filters/audio_renderer_impl.cc (working copy)
@@ -12,8 +12,7 @@
static const size_t kSamplesPerBuffer = 8*1024;
AudioRendererImpl::AudioRendererImpl()
- : AudioRendererBase(kDefaultMaxQueueSize),
- playback_rate_(0.0f),
+ : AudioRendererBase(),
stream_(NULL) {
}
@@ -36,7 +35,7 @@
void AudioRendererImpl::SetPlaybackRate(float rate) {
// TODO(fbarchard): limit rate to reasonable values
- playback_rate_ = rate;
+ AudioRendererBase::SetPlaybackRate(rate);
static bool started = false;
if (rate > 0.0f && !started && stream_)
@@ -57,8 +56,7 @@
// TODO(scherkus): Maybe change OnMoreData to pass in char/uint8 or similar.
// TODO(fbarchard): Waveout_output_win.h should handle zero length buffers
// without clicking.
- return FillBuffer(static_cast<uint8*>(dest_void), len,
- playback_rate_, base::TimeDelta());
+ return FillBuffer(static_cast<uint8*>(dest_void), len, base::TimeDelta());
}
void AudioRendererImpl::OnClose(AudioOutputStream* stream) {
« no previous file with comments | « media/filters/audio_renderer_impl.h ('k') | media/filters/null_audio_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698