| Index: Source/modules/webaudio/AudioContext.h
|
| diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
|
| index 092eece9ac5f427e7bf33a1913c3ae1f5dd9c4b4..eb12bf450fad7e8a0476f6b215b18262d8bb72ca 100644
|
| --- a/Source/modules/webaudio/AudioContext.h
|
| +++ b/Source/modules/webaudio/AudioContext.h
|
| @@ -219,11 +219,9 @@ public:
|
| virtual const AtomicString& interfaceName() const override final;
|
| virtual ExecutionContext* executionContext() const override final;
|
|
|
| - DEFINE_ATTRIBUTE_EVENT_LISTENER(complete);
|
| DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
|
|
|
| void startRendering();
|
| - void fireCompletionEvent();
|
| void notifyStateChange();
|
|
|
| // A context is considered closed if:
|
| @@ -238,11 +236,19 @@ public:
|
| // Get the security origin for this audio context.
|
| SecurityOrigin* securityOrigin() const;
|
|
|
| + // TODO: Refactoring needed. These are OfflineAudioContext-specific tasks.
|
| + virtual void fireCompletionEvent();
|
| + virtual bool shouldSuspendNow();
|
| + virtual void resolvePendingSuspendPromises();
|
| + AudioBuffer* renderTarget() const { return m_renderTarget.get(); }
|
| +
|
| protected:
|
| explicit AudioContext(Document*);
|
| AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
|
|
|
| - RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver;
|
| + // Shared with OfflineAudioContext.
|
| + void setContextState(AudioContextState);
|
| +
|
| private:
|
| void initialize();
|
| void uninitialize();
|
| @@ -307,7 +313,6 @@ private:
|
|
|
| // The state of the AudioContext.
|
| AudioContextState m_contextState;
|
| - void setContextState(AudioContextState);
|
|
|
| AsyncAudioDecoder m_audioDecoder;
|
|
|
| @@ -319,6 +324,9 @@ private:
|
| // can, try to stop them so they can be collected.
|
| void handleStoppableSourceNodes();
|
|
|
| + // Perform common tasks after the render quantum. Called by handlePostRenderTasks().
|
| + void performPostRenderTasks();
|
| +
|
| // This is considering 32 is large enough for multiple channels audio.
|
| // It is somewhat arbitrary and could be increased if necessary.
|
| enum { MaxNumberOfChannels = 32 };
|
|
|