Chromium Code Reviews| Index: content/renderer/media/audio_device.h |
| =================================================================== |
| --- content/renderer/media/audio_device.h (revision 113847) |
| +++ content/renderer/media/audio_device.h (working copy) |
| @@ -81,9 +81,12 @@ |
| public: |
| class CONTENT_EXPORT RenderCallback { |
| public: |
| - virtual void Render(const std::vector<float*>& audio_data, |
| - size_t number_of_frames, |
| - size_t audio_delay_milliseconds) = 0; |
| + // Always fills entire buffer but returns actual number of frames it got |
| + // from source. That actual number of frames is passed to host at the end |
| + // of the shared memory (i.e. buffer), and host is free to use or ignore it. |
|
Chris Rogers
2011/12/15 00:32:52
nit: the implementation details of "shared memory"
enal1
2011/12/15 16:54:40
Done.
|
| + virtual size_t Render(const std::vector<float*>& audio_data, |
| + size_t number_of_frames, |
| + size_t audio_delay_milliseconds) = 0; |
| protected: |
| virtual ~RenderCallback() {} |
| }; |
| @@ -160,9 +163,10 @@ |
| void Send(IPC::Message* message); |
| // Method called on the audio thread (+ one call on the IO thread) ---------- |
| - // Calls the client's callback for rendering audio. There will also be one |
| - // initial call on the IO thread before the audio thread has been created. |
| - void FireRenderCallback(int16* data); |
| + // Calls the client's callback for rendering audio. |
| + // Returns actual number of filled frames, see comment on |
| + // RenderCallback::Render(). |
|
Chris Rogers
2011/12/15 00:32:52
See my comment above.
enal1
2011/12/15 16:54:40
Done.
|
| + size_t FireRenderCallback(int16* data); |
| // DelegateSimpleThread::Delegate implementation. |
| virtual void Run() OVERRIDE; |