AudioParam needs tests for the parameter automation routines.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 08:01:01 +0000 (08:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 08:01:01 +0000 (08:01 +0000)
commitaa20f192514d344d6136d651a8ca026a9ac7a4ab
tree58d43e1f7516055b76c92b9a45a443f8dfa50949
parent8b42c946748498a3baf8a9c110c5dd4991e51ba7
AudioParam needs tests for the parameter automation routines.
https://bugs.webkit.org/show_bug.cgi?id=77666

Patch by Raymond Toy <rtoy@google.com> on 2012-03-02
Reviewed by Chris Rogers.

Source/WebCore:

Tests: webaudio/audioparam-linearRampToValueAtTime.html
       webaudio/audioparam-setTargetValueAtTime.html
       webaudio/audioparam-setValueAtTime.html
       webaudio/audioparam-setValueCurveAtTime.html

* webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl): Round the
curveIndex to fix timing issue in setValueCurveAtTime.

LayoutTests:

* webaudio/audioparam-exponentialRampToValueAtTime.html:
* webaudio/audioparam-linearRampToValueAtTime-expected.txt: Added.
* webaudio/audioparam-linearRampToValueAtTime.html: Added.
* webaudio/audioparam-setTargetValueAtTime-expected.txt: Added.
* webaudio/audioparam-setTargetValueAtTime.html: Added.
* webaudio/audioparam-setValueAtTime-expected.txt: Added.
* webaudio/audioparam-setValueAtTime.html: Added.
* webaudio/audioparam-setValueCurveAtTime-expected.txt: Added.
* webaudio/audioparam-setValueCurveAtTime.html: Added.
* webaudio/resources/audioparam-testing.js:
(renderLength):
(createConstantArray):
(createLinearRampArray):
(discreteTimeConstantForSampleRate):
(createExponentialApproachArray):
(createSineWaveArray):
(endValueDelta):
(valueUpdate):
(comparePartialSignals):
(verifyDiscontinuities):
(compareSignals):
(checkResultFunction.return.var):
(checkResultFunction):
(doAutomation):
(createAudioGraphAndTest):
* webaudio/resources/audio-testing.js: Moved isValidNumber from
biquad-testing.js to here.
* webaudio/resources/biquad-testing.js: Moved isValidNumber from
here to audio-testing.js.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/webaudio/audioparam-exponentialRampToValueAtTime.html
LayoutTests/webaudio/audioparam-linearRampToValueAtTime-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audioparam-linearRampToValueAtTime.html [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setTargetValueAtTime-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setTargetValueAtTime.html [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setValueAtTime-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setValueAtTime.html [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setValueCurveAtTime-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audioparam-setValueCurveAtTime.html [new file with mode: 0644]
LayoutTests/webaudio/resources/audio-testing.js
LayoutTests/webaudio/resources/audioparam-testing.js
LayoutTests/webaudio/resources/biquad-testing.js
Source/WebCore/ChangeLog
Source/WebCore/webaudio/AudioParamTimeline.cpp