Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / webaudio / AudioBufferSourceNode.h
index cb24a38..60f95ea 100644 (file)
@@ -35,7 +35,7 @@
 #include "wtf/RefPtr.h"
 #include "wtf/Threading.h"
 
-namespace WebCore {
+namespace blink {
 
 class AudioContext;
 
@@ -49,6 +49,7 @@ public:
     virtual ~AudioBufferSourceNode();
 
     // AudioNode
+    virtual void dispose() OVERRIDE;
     virtual void process(size_t framesToProcess) OVERRIDE;
 
     // setBuffer() is called on the main thread. This is the buffer we use for playback.
@@ -130,14 +131,20 @@ private:
     // It incorporates the base pitch rate, any sample-rate conversion factor from the buffer, and any doppler shift from an associated panner node.
     double totalPitchRate();
 
-    // We optionally keep track of a panner node which has a doppler shift that is incorporated into
-    // the pitch rate. We manually manage ref-counting because we want to use RefTypeConnection.
-    PannerNode* m_pannerNode;
+    // We optionally keep track of a panner node which has a doppler shift that
+    // is incorporated into the pitch rate.
+    // This RefPtr is connection reference. We must call AudioNode::
+    // makeConnection() after ref(), and call AudioNode::breakConnection()
+    // before deref().
+    // Oilpan: This holds connection references. We must call
+    // AudioNode::makeConnection when we add an AudioNode to this, and must call
+    // AudioNode::breakConnection() when we remove an AudioNode from this.
+    RefPtrWillBeMember<PannerNode> m_pannerNode;
 
     // This synchronizes process() with setBuffer() which can cause dynamic channel count changes.
     mutable Mutex m_processLock;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // AudioBufferSourceNode_h