Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 19:06:53 +0000 (19:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 19:06:53 +0000 (19:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81744

Patch by Xingnan Wang <xingnan.wang@intel.com> on 2012-03-21
Reviewed by Chris Rogers.

* platform/audio/ReverbConvolverStage.cpp:
(WebCore::ReverbConvolverStage::ReverbConvolverStage):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/audio/ReverbConvolverStage.cpp

index e6ade3e082bcefa5b1d0558f1dc0e76d6f5093e7..6c6c46c8cd538709b99c0c10f68158e04b40b907 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
+
+        Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=81744
+
+        Reviewed by Chris Rogers.
+
+        * platform/audio/ReverbConvolverStage.cpp:
+        (WebCore::ReverbConvolverStage::ReverbConvolverStage):
+
 2012-03-21  Xiaomei Ji  <xji@chromium.org>
 
         [chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
index 1d35e29dffd2ee6ee184be5d6db74a8fde585ff0..e8c4d3fb84378dc631747b04d1f94aee40179725 100644 (file)
@@ -70,9 +70,11 @@ ReverbConvolverStage::ReverbConvolverStage(const float* impulseResponse, size_t
 
     // But, the FFT convolution itself incurs fftSize / 2 latency, so subtract this out...
     size_t halfSize = fftSize / 2;
-    ASSERT(totalDelay >= halfSize);
-    if (totalDelay >= halfSize)
-        totalDelay -= halfSize;
+    if (!m_directMode) {
+        ASSERT(totalDelay >= halfSize);
+        if (totalDelay >= halfSize)
+            totalDelay -= halfSize;
+    }
 
     // We divide up the total delay, into pre and post delay sections so that we can schedule at exactly the moment when the FFT will happen.
     // This is coordinated with the other stages, so they don't all do their FFTs at the same time...