RESOLVED FIXED Bug 68828
DelayNode must set the context on delayTime AudioParam to support automation
https://bugs.webkit.org/show_bug.cgi?id=68828
Summary DelayNode must set the context on delayTime AudioParam to support automation
Chris Rogers
Reported 2011-09-26 12:50:46 PDT
DelayNode must set the context on delayTime AudioParam to support automation
Attachments
Patch (9.29 KB, patch)
2011-09-26 17:55 PDT, Chris Rogers
no flags
Patch (10.19 KB, patch)
2011-09-28 16:02 PDT, Chris Rogers
kbr: review+
Chris Rogers
Comment 1 2011-09-26 17:55:00 PDT
Kenneth Russell
Comment 2 2011-09-26 18:26:16 PDT
Comment on attachment 108768 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108768&action=review The change and tests look good but there's a cleanup I think you should make to the tests. > LayoutTests/webaudio/resources/delay-testing.js:4 > +var toneBuffer; These globals make the code difficult to understand. I think you should remove them. Suggestions below on how to do so. > LayoutTests/webaudio/resources/delay-testing.js:10 > +function createToneBuffer(frequency, numberOfCycles, sampleRate) { Change this to accept context as an argument. > LayoutTests/webaudio/resources/delay-testing.js:25 > +function checkDelayedResult(event) { Take the toneBuffer as an argument to this function and return a function taking the event: function checkDelayedResult(toneBuffer) { return function(event) { // ... } } Then in the tests, set context.oncomplete = checkDelayedResult(toneBuffer).
Chris Rogers
Comment 3 2011-09-28 16:02:31 PDT
Chris Rogers
Comment 4 2011-09-28 16:05:36 PDT
Ken, thanks for having a look. I've refactored as you suggested...
Kenneth Russell
Comment 5 2011-09-28 16:08:59 PDT
Comment on attachment 109082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=109082&action=review Looks good. Minor cleanup in the tests is still desired but feel free to do this upon landing the patch. r=me > LayoutTests/webaudio/delaynode-scheduling.html:18 > +var context; This doesn't need to be here. > LayoutTests/webaudio/delaynode-scheduling.html:29 > + context = new webkitAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); You can just use "var context" here. > LayoutTests/webaudio/delaynode.html:18 > var context; Same change here -- no global variable needed. > LayoutTests/webaudio/delaynode.html:29 > context = new webkitAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); Can use local variable declaration here too.
Chris Rogers
Comment 6 2011-09-28 17:05:08 PDT
Note You need to log in before you can comment on or make changes to this bug.