| Index: Source/modules/webaudio/AudioNode.h
|
| diff --git a/Source/modules/webaudio/AudioNode.h b/Source/modules/webaudio/AudioNode.h
|
| index d49f8faa45d4e3f15a7f429e300b847c61bfa70f..cfbb2d1fe3a54b5c70114106f77f5f2f27284e26 100644
|
| --- a/Source/modules/webaudio/AudioNode.h
|
| +++ b/Source/modules/webaudio/AudioNode.h
|
| @@ -93,21 +93,17 @@
|
| String nodeTypeName() const;
|
| void setNodeType(NodeType);
|
|
|
| + // We handle our own ref-counting because of the threading issues and subtle nature of
|
| + // how AudioNodes can continue processing (playing one-shot sound) after there are no more
|
| + // JavaScript references to the object.
|
| + enum RefType { RefTypeNormal, RefTypeConnection };
|
| +
|
| // Can be called from main thread or context's audio thread.
|
| - void ref();
|
| - void deref();
|
| -
|
| - // This object has been connected to another object. This might have
|
| - // existing connections from others.
|
| - // This function must be called after acquiring a connection reference.
|
| - void makeConnection();
|
| - // This object will be disconnected from another object. This might have
|
| - // remaining connections from others.
|
| - // This function must be called before releasing a connection reference.
|
| - void breakConnection();
|
| + void ref(RefType refType = RefTypeNormal);
|
| + void deref(RefType refType = RefTypeNormal);
|
|
|
| // Can be called from main thread or context's audio thread. It must be called while the context's graph lock is held.
|
| - void finishDeref();
|
| + void finishDeref(RefType refType);
|
|
|
| // The AudioNodeInput(s) (if any) will already have their input data available when process() is called.
|
| // Subclasses will take this input data and put the results in the AudioBus(s) of its AudioNodeOutput(s) (if any).
|
| @@ -229,7 +225,6 @@
|
| // Ref-counting
|
| volatile int m_normalRefCount;
|
| volatile int m_connectionRefCount;
|
| - bool m_wasDisconnected;
|
|
|
| bool m_isMarkedForDeletion;
|
| bool m_isDisabled;
|
|
|