Index: Source/modules/webaudio/AudioContext.h |
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h |
index bfb33051c35606bc57ea36da3a23eabdf796e336..8db6416ef12191170ba89ce413831058f3074470 100644 |
--- a/Source/modules/webaudio/AudioContext.h |
+++ b/Source/modules/webaudio/AudioContext.h |
@@ -219,12 +219,12 @@ 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(); |
+ virtual void fireCompletionEvent(); |
void notifyStateChange(); |
+ virtual bool shouldSuspendNow(); |
Raymond Toy
2015/05/28 16:37:35
Isn't this only used by an offline context?
hongchan
2015/06/09 20:49:59
This is used by OfflineAudioDestinatioNode. That's
Raymond Toy
2015/06/09 22:34:59
Then why not make it a private method in OfflineAu
|
// A context is considered closed if: |
// - closeContext() has been called, even if the audio HW has not yet been |
@@ -242,7 +242,13 @@ protected: |
explicit AudioContext(Document*); |
AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
- RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; |
+ // Shared with OfflineAudioContext. |
+ void setContextState(AudioContextState); |
+ bool m_didInitializeContextGraphMutex; |
+ bool m_isOfflineContext; |
+ Member<AudioBuffer> m_renderTarget; |
+ Member<AudioDestinationNode> m_destinationNode; |
Raymond Toy
2015/05/28 16:37:35
I think an offline context should use destination(
hongchan
2015/06/09 20:49:59
Seems like a good idea. Will look into it.
|
+ |
private: |
void initialize(); |
void uninitialize(); |
@@ -262,7 +268,6 @@ private: |
// haven't finished playing. Make sure to release them here. |
void releaseActiveSourceNodes(); |
- Member<AudioDestinationNode> m_destinationNode; |
Member<AudioListener> m_listener; |
// Only accessed in the audio thread. |
@@ -297,17 +302,9 @@ private: |
unsigned m_connectionCount; |
- // Graph locking. |
Raymond Toy
2015/05/28 16:37:35
Preserve these comments with the variable that you
hongchan
2015/06/09 20:49:59
Will do!
|
- bool m_didInitializeContextGraphMutex; |
RefPtr<DeferredTaskHandler> m_deferredTaskHandler; |
- Member<AudioBuffer> m_renderTarget; |
- |
- bool m_isOfflineContext; |
- |
- // The state of the AudioContext. |
AudioContextState m_contextState; |
- void setContextState(AudioContextState); |
AsyncAudioDecoder m_audioDecoder; |