#include "wtf/RefPtr.h"
#include "wtf/Threading.h"
-namespace WebCore {
+namespace blink {
class AudioContext;
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.
// 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