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

Unified Diff: media/filters/audio_renderer_base.h

Issue 9395057: Fix muted audio when playback rate != 1.0 or 0.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 8 years, 10 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_unittest.cc ('k') | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_base.h
diff --git a/media/filters/audio_renderer_base.h b/media/filters/audio_renderer_base.h
index 3e41c43f4dfdacaaee9de3c4a78e26e3c4ce71f6..20997ae5ef210a476ee5c6c7012eacaec9c91b70 100644
--- a/media/filters/audio_renderer_base.h
+++ b/media/filters/audio_renderer_base.h
@@ -73,9 +73,10 @@ class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
// Fills the given buffer with audio data by delegating to its |algorithm_|.
// FillBuffer() also takes care of updating the clock. Returns the number of
- // bytes copied into |dest|, which may be less than or equal to |len|.
+ // frames copied into |dest|, which may be less than or equal to
+ // |requested_frames|.
//
- // If this method is returns less bytes than |len| (including zero), it could
+ // If this method returns fewer frames than |requested_frames|, it could
// be a sign that the pipeline is stalled or unable to stream the data fast
// enough. In such scenarios, the callee should zero out unused portions
// of their buffer to playback silence.
@@ -95,7 +96,7 @@ class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
//
// Safe to call on any thread.
uint32 FillBuffer(uint8* dest,
- uint32 len,
+ uint32 requested_frames,
const base::TimeDelta& playback_delay);
// Called by OnRenderEndOfStream() or some callback scheduled by derived class
@@ -144,7 +145,7 @@ class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
bool pending_read_;
// Keeps track of whether we received and rendered the end of stream buffer.
- bool recieved_end_of_stream_;
+ bool received_end_of_stream_;
bool rendered_end_of_stream_;
// Audio time at end of last call to FillBuffer().
@@ -161,6 +162,8 @@ class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
base::TimeDelta seek_timestamp_;
+ uint32 bytes_per_frame_;
+
AudioDecoder::ReadCB read_cb_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererBase);
« no previous file with comments | « media/filters/audio_renderer_algorithm_base_unittest.cc ('k') | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698