haikuwebkit/LayoutTests/webaudio/audiobuffersource-negative-...

6 lines
86 B
Plaintext
Raw Permalink Normal View History

[WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate. https://bugs.webkit.org/show_bug.cgi?id=140955 Reviewed by Eric Carlson. Source/WebCore: Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html webaudio/audiobuffersource-negative-playbackrate.html Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of start() to set the initial playback position at the end of the play range if the rate of playback is negtive. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32]. (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max" for clarity. Add a non-interpolated and interpolated render step for negative playback. (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02. (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback. (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative. LayoutTests: * webaudio/audiobuffersource-negative-playbackrate-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop.html: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated.html: * webaudio/audiobuffersource-negative-playbackrate-loop-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-loop.html: Added. * webaudio/audiobuffersource-negative-playbackrate.html: * webaudio/resources/audiobuffersource-testing.js: (createRamp): Get rid of extra HRTF padding as it's now unnecessary. * webaudio/resources/note-grain-on-testing.js: (createSignalBuffer): (verifyStartAndEndFrames): Canonical link: https://commits.webkit.org/159442@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-02-09 19:45:54 +00:00
PASS Test playback at -1 playbackRate
Many WebAudio js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172398 Reviewed by Sam Weinig. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * resources/js-test.js: (shouldReject): Copied some funcitonality form js-test-pre.js that wasn't present here. * webaudio/analyser-exception.html: * webaudio/audiobuffer-neuter-expected.txt: * webaudio/audiobuffer-neuter.html: * webaudio/audiobuffersource-channels.html: * webaudio/audiobuffersource-ended-expected.txt: * webaudio/audiobuffersource-ended.html: * webaudio/audiobuffersource-exception.html: * webaudio/audiobuffersource-loop-comprehensive-expected.txt: * webaudio/audiobuffersource-loop-comprehensive.html: * webaudio/audiobuffersource-negative-playbackrate-expected.txt: * webaudio/audiobuffersource-negative-playbackrate-interpolated-expected.txt: * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop-expected.txt: * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop.html: * webaudio/audiobuffersource-negative-playbackrate-interpolated.html: * webaudio/audiobuffersource-negative-playbackrate-loop-expected.txt: * webaudio/audiobuffersource-negative-playbackrate-loop.html: * webaudio/audiobuffersource-negative-playbackrate.html: * webaudio/audiobuffersource-playbackState.html: * webaudio/audiobuffersource-start-expected.txt: * webaudio/audiobuffersource-start.html: * webaudio/audiochannelmerger-basic.html: * webaudio/audiochannelmerger-stereo.html: * webaudio/audiochannelsplitter.html: * webaudio/audiocontext-promise-throwing.html: * webaudio/audiocontext-promise.html: * webaudio/audiocontext-restriction-audiobuffersourcenode-start.html: * webaudio/audiocontext-restriction.html: * webaudio/audiocontext-state-interrupted.html: * webaudio/audiocontext-state.html: * webaudio/audionode-channel-rules.html: * webaudio/audionode-connect-order.html: * webaudio/audionode.html: * webaudio/audioparam-connect-audioratesignal.html: * webaudio/audioparam-summingjunction.html: * webaudio/audioprocessingevent.html: * webaudio/automatic-pull-node.html: * webaudio/biquad-allpass.html: * webaudio/biquad-bandpass.html: * webaudio/biquad-getFrequencyResponse.html: * webaudio/biquad-highpass.html: * webaudio/biquad-highshelf.html: * webaudio/biquad-lowpass.html: * webaudio/biquad-lowshelf.html: * webaudio/biquad-notch.html: * webaudio/biquad-peaking.html: * webaudio/biquadfilternode-basic.html: * webaudio/convolution-mono-mono.html: * webaudio/decode-audio-data-basic.html: * webaudio/decode-audio-data-too-short.html: * webaudio/delaynode-max-default-delay.html: * webaudio/delaynode-max-nondefault-delay.html: * webaudio/delaynode-maxdelay.html: * webaudio/delaynode-maxdelaylimit.html: * webaudio/delaynode-scheduling.html: * webaudio/delaynode.html: * webaudio/distance-exponential.html: * webaudio/distance-inverse.html: * webaudio/distance-linear.html: * webaudio/dynamicscompressor-basic.html: * webaudio/javascriptaudionode-downmix8-2channel-input.html: * webaudio/javascriptaudionode-upmix2-8channel-input.html: * webaudio/javascriptaudionode-zero-input-channels.html: * webaudio/javascriptaudionode.html: * webaudio/mediaelementaudiosourcenode.html: * webaudio/oscillator-basic.html: * webaudio/oscillator-ended-expected.txt: * webaudio/oscillator-ended.html: * webaudio/page-canstartmedia.html: * webaudio/panner-equalpower-stereo.html: * webaudio/panner-equalpower.html: * webaudio/panner-loop.html: * webaudio/pannernode-basic.html: * webaudio/realtimeanalyser-fft-scaling.html: * webaudio/realtimeanalyser-fft-sizing.html: * webaudio/resources/audiobuffersource-testing.js: (checkAllTests): * webaudio/sample-accurate-scheduling.html: * webaudio/stereo2mono-down-mixing.html: * webaudio/test-basic.html: * webaudio/waveshaper.html: Canonical link: https://commits.webkit.org/189368@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-22 20:49:12 +00:00
PASS successfullyParsed is true
TEST COMPLETE
[WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate. https://bugs.webkit.org/show_bug.cgi?id=140955 Reviewed by Eric Carlson. Source/WebCore: Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html webaudio/audiobuffersource-negative-playbackrate.html Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of start() to set the initial playback position at the end of the play range if the rate of playback is negtive. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32]. (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max" for clarity. Add a non-interpolated and interpolated render step for negative playback. (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02. (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback. (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative. LayoutTests: * webaudio/audiobuffersource-negative-playbackrate-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated-loop.html: Added. * webaudio/audiobuffersource-negative-playbackrate-interpolated.html: * webaudio/audiobuffersource-negative-playbackrate-loop-expected.txt: Added. * webaudio/audiobuffersource-negative-playbackrate-loop.html: Added. * webaudio/audiobuffersource-negative-playbackrate.html: * webaudio/resources/audiobuffersource-testing.js: (createRamp): Get rid of extra HRTF padding as it's now unnecessary. * webaudio/resources/note-grain-on-testing.js: (createSignalBuffer): (verifyStartAndEndFrames): Canonical link: https://commits.webkit.org/159442@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-02-09 19:45:54 +00:00