Fix ctor-audiobuffer.html so as not to access detached buffer |
||
Issue description
In that test, we do
let buffer =
new AudioBuffer({length: 128, sampleRate: context.sampleRate});
let data = buffer.getChannelData(0);
for (let k = 0; k < data.length; ++k)
data[k] = 1 + k;
Later on we expect to use the array data to compare with the output. But it's detached because the buffer is used an an AudioBufferSource that plays out the data.
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9edb15ca4945b30c95b3246e489687bea934a37e commit 9edb15ca4945b30c95b3246e489687bea934a37e Author: Raymond Toy <rtoy@chromium.org> Date: Thu Apr 26 15:43:05 2018 Adjust test not to access detached buffer Rearrange test so that we don't use getChannelData to access the buffer, because when the buffer is played, our view gets detached, and we're using it to compare with the actual results. Bug: 837012 Test: Test passes with Firefox, which correctly detaches data. Change-Id: I53ce8d97475dc70dab6a3f10ab401a9666544917 Reviewed-on: https://chromium-review.googlesource.com/1029111 Reviewed-by: Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#554036} [modify] https://crrev.com/9edb15ca4945b30c95b3246e489687bea934a37e/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/ctor-audiobuffer.html
,
Apr 27 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Apr 25 2018