Add normalize attribute to ConvolverNode to disable normalization.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2012 20:22:41 +0000 (20:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2012 20:22:41 +0000 (20:22 +0000)
commitc54e3617e6ef3db77360c3fd68431dfe8fb3a31c
tree4c2a2a1c0db54632f3ab3c66fb7606d34a793020
parent6e17930d20d7f825675954f602c44458b0178db6
Add normalize attribute to ConvolverNode to disable normalization.
https://bugs.webkit.org/show_bug.cgi?id=75126

Patch by Raymond Toy <rtoy@google.com> on 2012-01-09
Reviewed by Kenneth Russell.

Tests added in convolution-mono-mono.html.

* platform/audio/Reverb.cpp:
(WebCore::Reverb::Reverb): Add extra arg to indicate whether
normalization is enabled or not, and do it.
* platform/audio/Reverb.h: Update declaration.
* webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::ConvolverNode): Initialize attribute (to
true).
(WebCore::ConvolverNode::setBuffer): Call Reverb with
normalization argument.
* webaudio/ConvolverNode.h:
(WebCore::ConvolverNode::normalize): New method to return
normalization.
(WebCore::ConvolverNode::setNormalize):  New method to set
normalization.
* webaudio/ConvolverNode.idl: Add normalize attribute.
* LayoutTests/webaudio/convolution-mono-mono.html:
* LayoutTests/webaudio/convolution-mono-mono-expected.txt:
* LayoutTests/webaudio/resources/convolution-testing.js:
Test for convolution.  Tests only work when normalization is
disabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/webaudio/convolution-mono-mono-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/convolution-mono-mono.html [new file with mode: 0644]
LayoutTests/webaudio/resources/convolution-testing.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/Reverb.cpp
Source/WebCore/platform/audio/Reverb.h
Source/WebCore/webaudio/ConvolverNode.cpp
Source/WebCore/webaudio/ConvolverNode.h
Source/WebCore/webaudio/ConvolverNode.idl