Index: media/base/audio_renderer_sink.h |
=================================================================== |
--- media/base/audio_renderer_sink.h (revision 155437) |
+++ media/base/audio_renderer_sink.h (working copy) |
@@ -27,6 +27,11 @@ |
// number of frames filled. |
virtual int Render(AudioBus* audio_bus, int audio_delay_milliseconds) = 0; |
+ // Synchronized audio I/O - see InitializeIO() below. |
+ virtual void RenderIO(AudioBus* audio_input_data, |
scherkus (not reviewing)
2012/09/10 11:46:32
nit: most other code has these params as "source /
Chris Rogers
2012/09/10 19:21:38
Fixed to be more consistent:
I'm going to go with
|
+ AudioBus* audio_bus, |
+ int audio_delay_milliseconds) {} |
+ |
// Signals an error has occurred. |
virtual void OnRenderError() = 0; |
@@ -39,6 +44,17 @@ |
virtual void Initialize(const AudioParameters& params, |
RenderCallback* callback) = 0; |
+ // InitializeIO() may be called instead of Initialize() for clients who wish |
+ // to have synchronized input and output. |input_channels| specifies the |
+ // number of input channels which will be at the same sample-rate |
+ // and buffer-size as the output as specified in |params|. |
+ // The callback's RenderIO() method will be called instead of Render(), |
+ // providing the synchronized input data at the same time as when new |
+ // output data is to be rendered. |
+ virtual void InitializeIO(const AudioParameters& params, |
+ int input_channels, |
+ RenderCallback* callback) {} |
+ |
// Starts audio playback. |
virtual void Start() = 0; |