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

Unified Diff: media/base/audio_renderer_sink.h

Issue 9826023: Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT + address CR comments Created 8 years, 9 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
Index: media/base/audio_renderer_sink.h
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index 01eb18533587bdcd7b243a57c5402ca43cfb6cff..49ddbf540ce131ca321744ec41ee9d72f5e7df32 100644
--- a/media/base/audio_renderer_sink.h
+++ b/media/base/audio_renderer_sink.h
@@ -28,9 +28,9 @@ class AudioRendererSink
// continuous stream). That actual number of frames is passed to host
// together with PCM audio data and host is free to use or ignore it.
// TODO(crogers): use base:Callback instead.
- virtual size_t Render(const std::vector<float*>& audio_data,
- size_t number_of_frames,
- size_t audio_delay_milliseconds) = 0;
+ virtual int Render(const std::vector<float*>& audio_data,
+ int number_of_frames,
+ int audio_delay_milliseconds) = 0;
// Signals an error has occurred.
virtual void OnRenderError() = 0;
@@ -58,6 +58,10 @@ class AudioRendererSink
// Resumes playback after calling Pause().
virtual void Play() = 0;
+ // Called to inform the sink of a change in playback rate. Override if
+ // subclass needs the playback rate.
+ virtual void SetPlaybackRate(float rate) {};
+
// Sets the playback volume, with range [0.0, 1.0] inclusive.
// Returns |true| on success.
virtual bool SetVolume(double volume) = 0;

Powered by Google App Engine
This is Rietveld 408576698