| Index: Source/modules/webaudio/OfflineAudioDestinationNode.h
|
| diff --git a/Source/modules/webaudio/OfflineAudioDestinationNode.h b/Source/modules/webaudio/OfflineAudioDestinationNode.h
|
| index ca70d96aa1f5974f2f96f337040ff40479475c2d..1d91d73c564ccb58b7869444393407956e2dac54 100644
|
| --- a/Source/modules/webaudio/OfflineAudioDestinationNode.h
|
| +++ b/Source/modules/webaudio/OfflineAudioDestinationNode.h
|
| @@ -26,7 +26,9 @@
|
| #define OfflineAudioDestinationNode_h
|
|
|
| #include "modules/webaudio/AudioBuffer.h"
|
| +#include "modules/webaudio/AudioContext.h"
|
| #include "modules/webaudio/AudioDestinationNode.h"
|
| +#include "modules/webaudio/OfflineAudioContext.h"
|
| #include "public/platform/WebThread.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefPtr.h"
|
| @@ -35,6 +37,7 @@ namespace blink {
|
|
|
| class AudioBus;
|
| class AudioContext;
|
| +class OfflineAudioContext;
|
|
|
| class OfflineAudioDestinationHandler final : public AudioDestinationHandler {
|
| public:
|
| @@ -54,22 +57,30 @@ public:
|
|
|
| private:
|
| OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* renderTarget);
|
| - void offlineRender();
|
| - void offlineRenderInternal();
|
|
|
| - // For completion callback on main thread.
|
| + // For start/suspend/resume rendering.
|
| + void initiateOfflineRendering();
|
| + void renderNextQuantum();
|
| + void finishOfflineRendering();
|
| +
|
| + // For callback on main thread.
|
| + void notifySuspend();
|
| void notifyComplete();
|
|
|
| - // This AudioHandler renders into this AudioBuffer.
|
| - // This Persistent doesn't make a reference cycle including the owner
|
| - // OfflineAudioDestinationNode.
|
| + // This AudioHandler renders into this AudioBuffer. This Persistent doesn't
|
| + // make a reference cycle including the owner OfflineAudioDestinationNode.
|
| Persistent<AudioBuffer> m_renderTarget;
|
| +
|
| // Temporary AudioBus for each render quantum.
|
| RefPtr<AudioBus> m_renderBus;
|
|
|
| // Rendering thread.
|
| OwnPtr<WebThread> m_renderThread;
|
| - bool m_startedRendering;
|
| +
|
| + bool m_isRenderingStarted;
|
| +
|
| + unsigned m_framesProcessed;
|
| + size_t m_framesToProcess;
|
| };
|
|
|
| class OfflineAudioDestinationNode final : public AudioDestinationNode {
|
|
|