Chromium Code Reviews| Index: third_party/WebKit/Source/platform/audio/AudioDestination.h |
| diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.h b/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| index d0e35b80c7802e71e809db860a1a609cd40741cc..f5c699a181ffdbc4b13544953f8a64d9e501055e 100644 |
| --- a/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| +++ b/third_party/WebKit/Source/platform/audio/AudioDestination.h |
| @@ -31,7 +31,6 @@ |
| #include "platform/audio/AudioBus.h" |
| #include "platform/audio/AudioIOCallback.h" |
| -#include "platform/audio/AudioSourceProvider.h" |
| #include "public/platform/WebAudioDevice.h" |
| #include "public/platform/WebVector.h" |
| #include "wtf/Allocator.h" |
| @@ -41,15 +40,14 @@ |
| namespace blink { |
| -class AudioPullFIFO; |
| +class PushPullFIFO; |
| class SecurityOrigin; |
| // The AudioDestination class is an audio sink interface between the media |
| // renderer and the Blink's WebAudio module. It has a FIFO to adapt the |
| // different processing block sizes of WebAudio renderer and actual hardware |
| // audio callback. |
| -class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| - public AudioSourceProvider { |
| +class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback { |
| USING_FAST_MALLOC(AudioDestination); |
| WTF_MAKE_NONCOPYABLE(AudioDestination); |
| @@ -74,9 +72,6 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| double delayTimestamp, |
| size_t priorFramesSkipped) override; |
| - // AudioSourceProvider (FIFO) |
| - void provideInput(AudioBus* outputBus, size_t framesToProcess) override; |
| - |
| virtual void start(); |
| virtual void stop(); |
| @@ -98,8 +93,15 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, |
| // The render callback function of WebAudio engine. (i.e. DestinationNode) |
| AudioIOCallback& m_callback; |
| + // To pass the data from FIFO to the audio device callback. |
| RefPtr<AudioBus> m_outputBus; |
| - std::unique_ptr<AudioPullFIFO> m_fifo; |
| + |
| + // To push the rendered result from WebAudio graph into the FIFO. |
|
Raymond Toy
2017/01/09 22:46:02
I'm sorry. "To pass" and "To push" don't really he
hongchan
2017/01/10 21:15:58
They are pointers. WebAudio renderer fill up the m
|
| + RefPtr<AudioBus> m_renderBus; |
| + |
| + // Resolves the buffer size mismatch between the WebAudio engine and |
| + // the callback function from the actual audio device. |
| + std::unique_ptr<PushPullFIFO> m_fifo; |
| size_t m_framesElapsed; |
| AudioIOPosition m_outputPosition; |