createPeriodicWave takes sequence<float> instead of Float32Array |
||
Issue descriptionTo be consistent with the real and imag members of PeriodicWaveOptions, createPeriodicWave should also use sequence<float> types for the real and imag parameters. See https://github.com/WebAudio/web-audio-api/issues/1195
,
Apr 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/445c9544f743c5fb1dee4ba1594360bb10366f92 commit 445c9544f743c5fb1dee4ba1594360bb10366f92 Author: rtoy <rtoy@chromium.org> Date: Thu Apr 13 16:46:08 2017 createPeriodicWave parameters are sequence<float> Change the parameter types for createPeriodicWave from Float32Array to sequence<float>. this makes createPeriodicWave signal errors if non-finite Fourier coefficients are used and matches what the PeriodicWave constructor behavior. Also periodic-lengths.html was actually generating Infinity for some coefficient values, so the test is updated to correct for that. And the selected waveform is changed from square to sawtooth because the Fourier series for a sawtooth is non-zero everywhere. This fixes the problem where the wave with 8192 coefficients was the same as for 8191. Which has to be true because a square wave only has non-zero coefficients for the odd terms, so the arrays for 8192 and 8191 were the same. With a sawtooth, these are now different. Add new test to verify that we throw errors if non-finite values are used for the Fourier coefficients. BUG= 709512 TEST=periodicwave-lengths.html, periodicwave-exceptions.html Review-Url: https://codereview.chromium.org/2807673002 Cr-Commit-Position: refs/heads/master@{#464441} [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/webaudio/dom-exceptions-expected.txt [add] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-exceptions.html [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp [modify] https://crrev.com/445c9544f743c5fb1dee4ba1594360bb10366f92/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h
,
Apr 14 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Apr 11 2017Status: Started (was: Available)