BiquadFilterNode .type attribute is not handled correctly
authorcrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2011 19:13:22 +0000 (19:13 +0000)
committercrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2011 19:13:22 +0000 (19:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69182

Reviewed by Kenneth Russell.

Source/WebCore:

Test: webaudio/biquadfilternode-basic.html

* platform/audio/AudioDSPKernelProcessor.cpp:
(WebCore::AudioDSPKernelProcessor::initialize):
* webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
* webaudio/AudioChannelMerger.cpp:
(WebCore::AudioChannelMerger::AudioChannelMerger):
* webaudio/AudioChannelSplitter.cpp:
(WebCore::AudioChannelSplitter::AudioChannelSplitter):
* webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
* webaudio/AudioGainNode.cpp:
(WebCore::AudioGainNode::AudioGainNode):
* webaudio/AudioNode.cpp:
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::~AudioNode):
(WebCore::AudioNode::setNodeType):
(WebCore::AudioNode::ref):
(WebCore::AudioNode::finishDeref):
* webaudio/AudioNode.h:
(WebCore::AudioNode::nodeType):
* webaudio/AudioPannerNode.cpp:
(WebCore::AudioPannerNode::AudioPannerNode):
(WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode):
* webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::BiquadFilterNode):
(WebCore::BiquadFilterNode::setType):
* webaudio/BiquadFilterNode.h:
* webaudio/BiquadFilterNode.idl:
* webaudio/BiquadProcessor.h:
(WebCore::BiquadProcessor::setType):
* webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::ConvolverNode):
* webaudio/DelayNode.cpp:
(WebCore::DelayNode::DelayNode):
* webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
* webaudio/HighPass2FilterNode.cpp:
(WebCore::HighPass2FilterNode::HighPass2FilterNode):
* webaudio/JavaScriptAudioNode.cpp:
(WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
* webaudio/LowPass2FilterNode.cpp:
(WebCore::LowPass2FilterNode::LowPass2FilterNode):
* webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
* webaudio/RealtimeAnalyserNode.cpp:
(WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
* webaudio/WaveShaperNode.cpp:
(WebCore::WaveShaperNode::WaveShaperNode):

LayoutTests:

* webaudio/biquadfilternode-basic-expected.txt: Added.
* webaudio/biquadfilternode-basic.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/webaudio/biquadfilternode-basic-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/biquadfilternode-basic.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/AudioDSPKernelProcessor.cpp
Source/WebCore/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/webaudio/AudioChannelMerger.cpp
Source/WebCore/webaudio/AudioChannelSplitter.cpp
Source/WebCore/webaudio/AudioDestinationNode.cpp
Source/WebCore/webaudio/AudioGainNode.cpp
Source/WebCore/webaudio/AudioNode.cpp
Source/WebCore/webaudio/AudioNode.h
Source/WebCore/webaudio/AudioPannerNode.cpp
Source/WebCore/webaudio/BiquadFilterNode.cpp
Source/WebCore/webaudio/BiquadFilterNode.h
Source/WebCore/webaudio/BiquadFilterNode.idl
Source/WebCore/webaudio/BiquadProcessor.h
Source/WebCore/webaudio/ConvolverNode.cpp
Source/WebCore/webaudio/DelayNode.cpp
Source/WebCore/webaudio/DynamicsCompressorNode.cpp
Source/WebCore/webaudio/HighPass2FilterNode.cpp
Source/WebCore/webaudio/JavaScriptAudioNode.cpp
Source/WebCore/webaudio/LowPass2FilterNode.cpp
Source/WebCore/webaudio/MediaElementAudioSourceNode.cpp
Source/WebCore/webaudio/RealtimeAnalyserNode.cpp
Source/WebCore/webaudio/WaveShaperNode.cpp

index 01d01b63252e04e10c2d2164c7d689d2a363f58e..881319ea9f48930e319ba15295b2e0bc34de59c6 100644 (file)
@@ -1,3 +1,13 @@
+2011-10-03  Chris Rogers  <crogers@google.com>
+
+        BiquadFilterNode .type attribute is not handled correctly
+        https://bugs.webkit.org/show_bug.cgi?id=69182
+
+        Reviewed by Kenneth Russell.
+
+        * webaudio/biquadfilternode-basic-expected.txt: Added.
+        * webaudio/biquadfilternode-basic.html: Added.
+
 2011-10-03  Chris Fleizach  <cfleizach@apple.com>
 
         AX: support role mapping for HTML5 section elements
diff --git a/LayoutTests/webaudio/biquadfilternode-basic-expected.txt b/LayoutTests/webaudio/biquadfilternode-basic-expected.txt
new file mode 100644 (file)
index 0000000..a992104
--- /dev/null
@@ -0,0 +1,18 @@
+Basic tests for BiquadFilterNode.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS Biquad filter defaults to low-pass filter.
+PASS Biquad filter type 0 is settable.
+PASS Biquad filter type 1 is settable.
+PASS Biquad filter type 2 is settable.
+PASS Biquad filter type 3 is settable.
+PASS Biquad filter type 4 is settable.
+PASS Biquad filter type 5 is settable.
+PASS Biquad filter type 6 is settable.
+PASS Biquad filter type 7 is settable.
+PASS Illegal filter type correctly throws exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/webaudio/biquadfilternode-basic.html b/LayoutTests/webaudio/biquadfilternode-basic.html
new file mode 100644 (file)
index 0000000..515f564
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description("Basic tests for BiquadFilterNode.");
+
+var context = 0;
+
+function runTest() {
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+    
+    window.jsTestIsAsync = true;
+
+    context = new webkitAudioContext();
+    var filter = context.createBiquadFilter();
+    
+    // FIXME: we need to expose the actual filter type constants in the IDL
+    
+    // Check the filter type.
+    if (filter.type == 0)
+        testPassed("Biquad filter defaults to low-pass filter.");
+    else
+        testFailed("Biquad filter should default to low-pass filter.");
+
+    // Check that all legal filter types can be set.
+    // FIXME: use last defined filter constant (ALLPASS) instead of hard-coded 7 once it's defined in the IDL.
+    for (var i = 0; i <= 7; ++i) {
+        try {
+            filter.type = i;
+            
+            if (filter.type == i) {
+                var message = "Biquad filter type " + i + " is settable.";
+                testPassed(message);
+            } else {
+                var message = "Biquad filter type " + i + " was not correctly set.";
+                testFailed(message);
+            }
+        } catch(e) {
+            var message = "Biquad filter type " + i + " should not throw exception.";
+            testFailed(message);
+        }
+    }
+
+    // Check that illegal filter type throws.
+    try {
+        filter.type = 8;
+        testFailed("Illegal filter type should throw exception.");
+    } catch(e) {
+        testPassed("Illegal filter type correctly throws exception.");
+    }
+
+    finishJSTest();
+}
+
+runTest();
+successfullyParsed = true;
+
+</script>
+
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index 9c5ea26b9821b5f8a9b613a0d1053c0111a698e5..0555320577578db07d8893ebac0f7ff8166afbf7 100644 (file)
@@ -1,3 +1,61 @@
+2011-10-03  Chris Rogers  <crogers@google.com>
+
+        BiquadFilterNode .type attribute is not handled correctly
+        https://bugs.webkit.org/show_bug.cgi?id=69182
+
+        Reviewed by Kenneth Russell.
+
+        Test: webaudio/biquadfilternode-basic.html
+
+        * platform/audio/AudioDSPKernelProcessor.cpp:
+        (WebCore::AudioDSPKernelProcessor::initialize):
+        * webaudio/AudioBufferSourceNode.cpp:
+        (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
+        * webaudio/AudioChannelMerger.cpp:
+        (WebCore::AudioChannelMerger::AudioChannelMerger):
+        * webaudio/AudioChannelSplitter.cpp:
+        (WebCore::AudioChannelSplitter::AudioChannelSplitter):
+        * webaudio/AudioDestinationNode.cpp:
+        (WebCore::AudioDestinationNode::AudioDestinationNode):
+        * webaudio/AudioGainNode.cpp:
+        (WebCore::AudioGainNode::AudioGainNode):
+        * webaudio/AudioNode.cpp:
+        (WebCore::AudioNode::AudioNode):
+        (WebCore::AudioNode::~AudioNode):
+        (WebCore::AudioNode::setNodeType):
+        (WebCore::AudioNode::ref):
+        (WebCore::AudioNode::finishDeref):
+        * webaudio/AudioNode.h:
+        (WebCore::AudioNode::nodeType):
+        * webaudio/AudioPannerNode.cpp:
+        (WebCore::AudioPannerNode::AudioPannerNode):
+        (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode):
+        * webaudio/BiquadFilterNode.cpp:
+        (WebCore::BiquadFilterNode::BiquadFilterNode):
+        (WebCore::BiquadFilterNode::setType):
+        * webaudio/BiquadFilterNode.h:
+        * webaudio/BiquadFilterNode.idl:
+        * webaudio/BiquadProcessor.h:
+        (WebCore::BiquadProcessor::setType):
+        * webaudio/ConvolverNode.cpp:
+        (WebCore::ConvolverNode::ConvolverNode):
+        * webaudio/DelayNode.cpp:
+        (WebCore::DelayNode::DelayNode):
+        * webaudio/DynamicsCompressorNode.cpp:
+        (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
+        * webaudio/HighPass2FilterNode.cpp:
+        (WebCore::HighPass2FilterNode::HighPass2FilterNode):
+        * webaudio/JavaScriptAudioNode.cpp:
+        (WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
+        * webaudio/LowPass2FilterNode.cpp:
+        (WebCore::LowPass2FilterNode::LowPass2FilterNode):
+        * webaudio/MediaElementAudioSourceNode.cpp:
+        (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
+        * webaudio/RealtimeAnalyserNode.cpp:
+        (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
+        * webaudio/WaveShaperNode.cpp:
+        (WebCore::WaveShaperNode::WaveShaperNode):
+
 2011-10-03  Chris Fleizach  <cfleizach@apple.com>
 
         AX: support role mapping for HTML5 section elements
index d79afd5bedfc3441cbd95584851cd2039028663e..c901619c380194ba1e5ecec754d6dfe10c3de8b1 100644 (file)
@@ -56,8 +56,9 @@ void AudioDSPKernelProcessor::initialize()
     // Create processing kernels, one per channel.
     for (unsigned i = 0; i < numberOfChannels(); ++i)
         m_kernels.append(createKernel());
-
+        
     m_initialized = true;
+    m_hasJustReset = true;
 }
 
 void AudioDSPKernelProcessor::uninitialize()
index b135060e15a649bfa794f7213513a6a6138e7965..4a230e08230cd5bd3b605ef759c9e90b581a634e 100644 (file)
@@ -68,7 +68,7 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, double sampl
     , m_lastGain(1.0)
     , m_pannerNode(0)
 {
-    setType(NodeTypeAudioBufferSource);
+    setNodeType(NodeTypeAudioBufferSource);
 
     m_gain = AudioGain::create("gain", 1.0, 0.0, 1.0);
     m_playbackRate = AudioParam::create("playbackRate", 1.0, 0.0, MaxRate);
index 40a6386ff08d411fde6540fe02e30330fe7461f5..0f8cc0002fe1cd29d3c80754a799d97cb965ffca 100644 (file)
@@ -51,7 +51,7 @@ AudioChannelMerger::AudioChannelMerger(AudioContext* context, double sampleRate)
 
     addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
     
-    setType(NodeTypeChannelMerger);
+    setNodeType(NodeTypeChannelMerger);
     
     initialize();
 }
index f4fa0415c7e3ccf18cfdd183f7ee7157a5a7e82a..7e90b7a93c6f4d285a514e6e4fcea25ec780ef7c 100644 (file)
@@ -46,7 +46,7 @@ AudioChannelSplitter::AudioChannelSplitter(AudioContext* context, double sampleR
     for (unsigned i = 0; i < NumberOfOutputs; ++i)
         addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
     
-    setType(NodeTypeChannelSplitter);
+    setNodeType(NodeTypeChannelSplitter);
     
     initialize();
 }
index 15980e4d3b2f36bca601a4d899217df297c924c6..a735ca10c09c63a29388207e0ab85e2d39b1c871 100644 (file)
@@ -42,7 +42,7 @@ AudioDestinationNode::AudioDestinationNode(AudioContext* context, double sampleR
 {
     addInput(adoptPtr(new AudioNodeInput(this)));
     
-    setType(NodeTypeDestination);
+    setNodeType(NodeTypeDestination);
 }
 
 AudioDestinationNode::~AudioDestinationNode()
index d5f130181b8ccc65c38992945725dbea552dd20f..3678792d2674dd68b864c99a047602601dea3df6 100644 (file)
@@ -45,7 +45,7 @@ AudioGainNode::AudioGainNode(AudioContext* context, double sampleRate)
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
     
-    setType(NodeTypeGain);
+    setNodeType(NodeTypeGain);
     
     initialize();
 }
index 9bbb48d2c186be96808545672beb90bdb24461e0..0c17de60cbe6ac0d97f050630654e18a89353278 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 AudioNode::AudioNode(AudioContext* context, double sampleRate)
     : m_isInitialized(false)
-    , m_type(NodeTypeUnknown)
+    , m_nodeType(NodeTypeUnknown)
     , m_context(context)
     , m_sampleRate(sampleRate)
     , m_lastProcessingTime(-1.0)
@@ -59,8 +59,8 @@ AudioNode::AudioNode(AudioContext* context, double sampleRate)
 AudioNode::~AudioNode()
 {
 #if DEBUG_AUDIONODE_REFERENCES
-    --s_nodeCount[type()];
-    printf("%p: %d: AudioNode::~AudioNode() %d %d %d\n", this, type(), m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+    --s_nodeCount[nodeType()];
+    printf("%p: %d: AudioNode::~AudioNode() %d %d %d\n", this, nodeType(), m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
 #endif
 }
 
@@ -74,9 +74,9 @@ void AudioNode::uninitialize()
     m_isInitialized = false;
 }
 
-void AudioNode::setType(NodeType type)
+void AudioNode::setNodeType(NodeType type)
 {
-    m_type = type;
+    m_nodeType = type;
 
 #if DEBUG_AUDIONODE_REFERENCES
     ++s_nodeCount[type];
@@ -196,7 +196,7 @@ void AudioNode::ref(RefType refType)
     }
 
 #if DEBUG_AUDIONODE_REFERENCES
-    printf("%p: %d: AudioNode::ref(%d) %d %d %d\n", this, type(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+    printf("%p: %d: AudioNode::ref(%d) %d %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
 #endif
 
     // See the disabling code in finishDeref() below. This handles the case where a node
@@ -268,7 +268,7 @@ void AudioNode::finishDeref(RefType refType)
     }
     
 #if DEBUG_AUDIONODE_REFERENCES
-    printf("%p: %d: AudioNode::deref(%d) %d %d %d\n", this, type(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+    printf("%p: %d: AudioNode::deref(%d) %d %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
 #endif
 
     if (!m_connectionRefCount) {
@@ -295,7 +295,7 @@ void AudioNode::finishDeref(RefType refType)
                 // because they no longer have any input connections.  This needs to be handled more generally where AudioNodes have
                 // a tailTime attribute.  Then the AudioNode only needs to remain "active" for tailTime seconds after there are no
                 // longer any active connections.
-                if (type() != NodeTypeConvolver && type() != NodeTypeDelay) {
+                if (nodeType() != NodeTypeConvolver && nodeType() != NodeTypeDelay) {
                     m_isDisabled = true;
                     for (unsigned i = 0; i < m_outputs.size(); ++i)
                         output(i)->disable();
index 74b9a9240cc6ea27ef8d563e5ae5a526b5d18693..00871dd59639532be6d77c34f723686056f703e7 100644 (file)
@@ -74,8 +74,8 @@ public:
         NodeTypeEnd
     };
 
-    NodeType type() const { return m_type; }
-    void setType(NodeType);
+    NodeType nodeType() const { return m_nodeType; }
+    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
@@ -148,7 +148,7 @@ protected:
 
 private:
     volatile bool m_isInitialized;
-    NodeType m_type;
+    NodeType m_nodeType;
     RefPtr<AudioContext> m_context;
     double m_sampleRate;
     Vector<OwnPtr<AudioNodeInput> > m_inputs;
index 5c947636d1f893a43a77f74c7ee7b43b2c03b56b..7d26feac947d76c4baf47847f81fae4705c29324 100644 (file)
@@ -62,7 +62,7 @@ AudioPannerNode::AudioPannerNode(AudioContext* context, double sampleRate)
     m_orientation = FloatPoint3D(1, 0, 0);
     m_velocity = FloatPoint3D(0, 0, 0);
     
-    setType(NodeTypePanner);
+    setNodeType(NodeTypePanner);
 
     initialize();
 }
@@ -294,7 +294,7 @@ void AudioPannerNode::notifyAudioSourcesConnectedToNode(AudioNode* node)
         return;
         
     // First check if this node is an AudioBufferSourceNode.  If so, let it know about us so that doppler shift pitch can be taken into account.
-    if (node->type() == NodeTypeAudioBufferSource) {
+    if (node->nodeType() == NodeTypeAudioBufferSource) {
         AudioBufferSourceNode* bufferSourceNode = reinterpret_cast<AudioBufferSourceNode*>(node);
         bufferSourceNode->setPannerNode(this);
     } else {    
index a61ee5b4dfdcaa76328e4ab2c31b3a96383d9db5..ced07b8bad501469560f80d7b5179a6b0d3ab824 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "BiquadFilterNode.h"
 
+#include "ExceptionCode.h"
+
 namespace WebCore {
 
 BiquadFilterNode::BiquadFilterNode(AudioContext* context, double sampleRate)
@@ -38,7 +40,17 @@ BiquadFilterNode::BiquadFilterNode(AudioContext* context, double sampleRate)
     biquadProcessor()->parameter1()->setContext(context);
     biquadProcessor()->parameter2()->setContext(context);
     biquadProcessor()->parameter3()->setContext(context);
-    setType(NodeTypeBiquadFilter);
+    setNodeType(NodeTypeBiquadFilter);
+}
+
+void BiquadFilterNode::setType(unsigned short type, ExceptionCode& ec)
+{
+    if (type > BiquadProcessor::Allpass) {
+        ec = NOT_SUPPORTED_ERR;
+        return;
+    }
+    
+    biquadProcessor()->setType(static_cast<BiquadProcessor::FilterType>(type));
 }
 
 } // namespace WebCore
index 579905b6ceaa2801b845f497ea9fca76aef5c6c2..dfe17b3ad6a2912875a3579e66e4cbbd143c3771 100644 (file)
@@ -52,7 +52,7 @@ public:
     }
     
     unsigned short type() { return biquadProcessor()->type(); }
-    void setType(unsigned short type) { biquadProcessor()->setType(static_cast<BiquadProcessor::FilterType>(type)); }
+    void setType(unsigned short type, ExceptionCode&);
 
     AudioParam* frequency() { return biquadProcessor()->parameter1(); }
     AudioParam* q() { return biquadProcessor()->parameter2(); }
index 817f65863d62e032ef8c6936759abc4ac7c46e5a..5861b889ccf5725bc2d8dd94ac2e498ef826de6d 100644 (file)
@@ -37,7 +37,9 @@ module audio {
         const unsigned short NOTCH = 6;
         const unsigned short ALLPASS = 7;
 
-        attribute unsigned short type;
+        attribute unsigned short type
+            setter raises(DOMException);
+        
         readonly attribute AudioParam frequency; // in Hertz
         readonly attribute AudioParam Q; // Quality factor
         readonly attribute AudioParam gain; // in Decibels
index 3bb7a015059d2daf1aef1ebd4d8e1fd4e5b17604..3c521852d031786a2c56df69d5066af385ba35a8 100644 (file)
@@ -67,7 +67,7 @@ public:
     AudioParam* parameter3() { return m_parameter3.get(); }
 
     FilterType type() const { return m_type; }
-    void setType(FilterType type) { m_type = type; }
+    void setType(FilterType type) { m_type = type; reset(); }
 
 private:
     FilterType m_type;
index 2651a5598afecd2cb1941a144a8ea1b0de65c5b3..28d57db31042b789d3af4bd41b78af739833828c 100644 (file)
@@ -51,7 +51,7 @@ ConvolverNode::ConvolverNode(AudioContext* context, double sampleRate)
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 2)));
     
-    setType(NodeTypeConvolver);
+    setNodeType(NodeTypeConvolver);
     
     initialize();
 }
index bf2def59e12774b9818c10504c3e3d60f7a80836..b578d60480cec1863a62cf67f27cbee8dc7f5102 100644 (file)
@@ -35,7 +35,7 @@ DelayNode::DelayNode(AudioContext* context, double sampleRate)
 {
     m_processor = adoptPtr(new DelayProcessor(sampleRate, 1));    
     delayTime()->setContext(context);
-    setType(NodeTypeDelay);
+    setNodeType(NodeTypeDelay);
 }
 
 AudioParam* DelayNode::delayTime()
index 22e8cdcfbf596813b4a9d00b8160ea9ff85cbdd3..6feb2960918689a68b703f0852327f4b145b6d2f 100644 (file)
@@ -41,7 +41,7 @@ DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* context, double sam
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 2)));
     
-    setType(NodeTypeDynamicsCompressor);
+    setNodeType(NodeTypeDynamicsCompressor);
     
     initialize();
 }
index 0ec1defc76625460efacd498611dfface9bcf205..27946dd99fa3409fcbb5a6df66088fdeba536638 100644 (file)
@@ -37,7 +37,7 @@ HighPass2FilterNode::HighPass2FilterNode(AudioContext* context, double sampleRat
     biquadProcessor()->parameter1()->setContext(context);
     biquadProcessor()->parameter2()->setContext(context);
     biquadProcessor()->parameter3()->setContext(context);
-    setType(NodeTypeHighPass2Filter);
+    setNodeType(NodeTypeHighPass2Filter);
 }
 
 } // namespace WebCore
index 1791de00d43627ee4d9a8d2974001d3040652a32..487299b4602d7bc6ae1ddc62e4b3525f133a65e7 100644 (file)
@@ -81,7 +81,7 @@ JavaScriptAudioNode::JavaScriptAudioNode(AudioContext* context, double sampleRat
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 2)));
 
-    setType(NodeTypeJavaScript);
+    setNodeType(NodeTypeJavaScript);
 
     initialize();
 }
index 149bd45d9201f9ab06ae24eda992819abdc47e99..ac2de1ff24e603bb9f86e3cbec5502897d756f9b 100644 (file)
@@ -37,7 +37,7 @@ LowPass2FilterNode::LowPass2FilterNode(AudioContext* context, double sampleRate)
     biquadProcessor()->parameter1()->setContext(context);
     biquadProcessor()->parameter2()->setContext(context);
     biquadProcessor()->parameter3()->setContext(context);
-    setType(NodeTypeLowPass2Filter);
+    setNodeType(NodeTypeLowPass2Filter);
 }
 
 } // namespace WebCore
index 65b3e2ceec150c7ec13c47db1838313e0fcd874b..29b6ed34a3d67537aed0a13cfd9cba3e3beaa099 100644 (file)
@@ -46,7 +46,7 @@ MediaElementAudioSourceNode::MediaElementAudioSourceNode(AudioContext* context,
     // Default to stereo. This could change depending on what the media element .src is set to.
     addOutput(adoptPtr(new AudioNodeOutput(this, 2)));
     
-    setType(NodeTypeMediaElementAudioSource);
+    setNodeType(NodeTypeMediaElementAudioSource);
 
     initialize();
 }
index 2ba751aa2e1ff69797408c257eb31bf21b3a570d..449c84afef971a05cb2372ccf31c7c3c1a4221f0 100644 (file)
@@ -39,7 +39,7 @@ RealtimeAnalyserNode::RealtimeAnalyserNode(AudioContext* context, double sampleR
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 2)));
     
-    setType(NodeTypeAnalyser);
+    setNodeType(NodeTypeAnalyser);
     
     initialize();
 }
index 09d6aadabddae1fca3391828e9902c8c62433410..03504e777605f72a21826f9a1b3fa01404cda70d 100644 (file)
@@ -35,7 +35,7 @@ WaveShaperNode::WaveShaperNode(AudioContext* context)
     : AudioBasicProcessorNode(context, context->sampleRate())
 {
     m_processor = adoptPtr(new WaveShaperProcessor(context->sampleRate(), 1));
-    setType(NodeTypeWaveShaper);
+    setNodeType(NodeTypeWaveShaper);
 }
 
 void WaveShaperNode::setCurve(Float32Array* curve)