summaryrefslogtreecommitdiffstats
path: root/media/base/audio_renderer_sink.h
diff options
context:
space:
mode:
authorvrk@chromium.org <vrk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 03:17:44 +0000
committervrk@chromium.org <vrk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 03:17:44 +0000
commite4fc09e874d7a7fc87dc1565452d32985949a3cf (patch)
tree8a8a5f596294a3db7c6aa3998b8562a4b24e60e9 /media/base/audio_renderer_sink.h
parentf2ebbf06167ad4ff8cb23109b3652c8c4b7ff5f7 (diff)
downloadchromium_src-e4fc09e874d7a7fc87dc1565452d32985949a3cf.zip
chromium_src-e4fc09e874d7a7fc87dc1565452d32985949a3cf.tar.gz
chromium_src-e4fc09e874d7a7fc87dc1565452d32985949a3cf.tar.bz2
Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink
This CL removes AudioRendererImpl and replaces it with AudioRendererBase. NullAudioRenderer is also removed and replaced with NullAudioSink. Also, a subtle bug is fixed in AudioRendererBase to allow for smooth video playback when running Chrome with the --disable-audio flag. BUG=119549,116645 TEST=media_unittests, playing video on Chrome/content_shell with and without --disable-audio flag should look identical Review URL: http://codereview.chromium.org/9826023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/audio_renderer_sink.h')
-rw-r--r--media/base/audio_renderer_sink.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index 01eb185..49ddbf5 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;