Chromium Code Reviews| Index: content/renderer/media/audio_renderer_impl.h |
| =================================================================== |
| --- content/renderer/media/audio_renderer_impl.h (revision 114311) |
| +++ content/renderer/media/audio_renderer_impl.h (working copy) |
| @@ -26,15 +26,17 @@ |
| #include "media/audio/audio_io.h" |
| #include "media/audio/audio_parameters.h" |
| #include "media/filters/audio_renderer_base.h" |
| +#include "media/filters/audio_renderer_sink.h" |
| class AudioMessageFilter; |
| class CONTENT_EXPORT AudioRendererImpl |
| : public media::AudioRendererBase, |
| - public AudioDevice::RenderCallback { |
| + public media::AudioRendererSink::RenderCallback { |
| public: |
| // Methods called on Render thread ------------------------------------------ |
| - AudioRendererImpl(); |
| + // An AudioRendererSink is used as the destination for the rendered audio. |
| + AudioRendererImpl(media::AudioRendererSink* sink); |
| virtual ~AudioRendererImpl(); |
| // Methods called on pipeline thread ---------------------------------------- |
| @@ -74,7 +76,7 @@ |
| void DoPause(); |
| void DoSeek(); |
| - // AudioDevice::RenderCallback implementation. |
| + // media::AudioRendererSink::RenderCallback implementation. |
| virtual void Render(const std::vector<float*>& audio_data, |
| size_t number_of_frames, |
| size_t audio_delay_milliseconds) OVERRIDE; |
| @@ -103,9 +105,12 @@ |
| // A flag that indicates this filter is called to stop. |
| bool stopped_; |
| - // audio_device_ is the sink (destination) for rendered audio. |
| - scoped_refptr<AudioDevice> audio_device_; |
| + // sink_ is the sink (destination) for rendered audio. |
|
acolwell GONE FROM CHROMIUM
2011/12/21 22:53:56
s/sink_ is the/The/
Chris Rogers
2011/12/22 00:54:33
Done.
|
| + media::AudioRendererSink* sink_; |
|
acolwell GONE FROM CHROMIUM
2011/12/21 22:53:56
shouldn't this be a scoped_refptr<AudioRendererSin
Chris Rogers
2011/12/22 00:54:33
Done.
|
| + // Set to true when OnInitialize() is called. |
| + bool is_initialized_; |
| + |
| // We're supposed to know amount of audio data OS or hardware buffered, but |
| // that is not always so -- on my Linux box |
| // AudioBuffersState::hardware_delay_bytes never reaches 0. |