Title: [96846] trunk/Source/WebCore
Revision
96846
Author
[email protected]
Date
2011-10-06 12:20:45 -0700 (Thu, 06 Oct 2011)

Log Message

BiquadFilterNode must not reset filter state if type attribute is set to the same type
https://bugs.webkit.org/show_bug.cgi?id=69485

Reviewed by Kenneth Russell.

No new tests.  This particular case is difficult to test with a layout test using OfflineAudioContext.

* webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::setType):
* webaudio/BiquadProcessor.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (96845 => 96846)


--- trunk/Source/WebCore/ChangeLog	2011-10-06 19:16:54 UTC (rev 96845)
+++ trunk/Source/WebCore/ChangeLog	2011-10-06 19:20:45 UTC (rev 96846)
@@ -1,3 +1,16 @@
+2011-10-06  Chris Rogers  <[email protected]>
+
+        BiquadFilterNode must not reset filter state if type attribute is set to the same type
+        https://bugs.webkit.org/show_bug.cgi?id=69485
+
+        Reviewed by Kenneth Russell.
+
+        No new tests.  This particular case is difficult to test with a layout test using OfflineAudioContext.
+
+        * webaudio/BiquadProcessor.cpp:
+        (WebCore::BiquadProcessor::setType):
+        * webaudio/BiquadProcessor.h:
+
 2011-10-06  Raphael Kubo da Costa  <[email protected]>
 
         [EFL] Do not create cairo surfaces with the wrong size for form elements

Modified: trunk/Source/WebCore/webaudio/BiquadProcessor.cpp (96845 => 96846)


--- trunk/Source/WebCore/webaudio/BiquadProcessor.cpp	2011-10-06 19:16:54 UTC (rev 96845)
+++ trunk/Source/WebCore/webaudio/BiquadProcessor.cpp	2011-10-06 19:20:45 UTC (rev 96846)
@@ -122,6 +122,14 @@
         m_kernels[i]->process(source->channel(i)->data(), destination->channel(i)->data(), framesToProcess);
 }
 
+void BiquadProcessor::setType(FilterType type)
+{
+    if (type != m_type) {
+        m_type = type;
+        reset(); // The filter state must be reset only if the type has changed.
+    }
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(WEB_AUDIO)

Modified: trunk/Source/WebCore/webaudio/BiquadProcessor.h (96845 => 96846)


--- trunk/Source/WebCore/webaudio/BiquadProcessor.h	2011-10-06 19:16:54 UTC (rev 96845)
+++ trunk/Source/WebCore/webaudio/BiquadProcessor.h	2011-10-06 19:20:45 UTC (rev 96846)
@@ -67,7 +67,7 @@
     AudioParam* parameter3() { return m_parameter3.get(); }
 
     FilterType type() const { return m_type; }
-    void setType(FilterType type) { m_type = type; reset(); }
+    void setType(FilterType);
 
 private:
     FilterType m_type;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to