RESOLVED FIXED Bug 85818
JavaScriptAudioNode should not ASSERT if number of input channels is 0
https://bugs.webkit.org/show_bug.cgi?id=85818
Summary JavaScriptAudioNode should not ASSERT if number of input channels is 0
Raymond Toy
Reported 2012-05-07 12:50:06 PDT
It is valid to have 0 input channels for a JavaScriptAudioNode, so we shouldn't ASSERT in that case.
Attachments
Patch (6.08 KB, patch)
2012-05-07 14:23 PDT, Raymond Toy
no flags
Patch (6.51 KB, patch)
2012-05-08 11:44 PDT, Raymond Toy
no flags
Raymond Toy
Comment 1 2012-05-07 14:23:44 PDT
Chris Rogers
Comment 2 2012-05-07 17:17:15 PDT
Comment on attachment 140592 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140592&action=review Hi Ray, thanks very much for the fix and layout test. Just a few nits: > LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:7 > +<title>JavaScriptAudioNode</title> <title> line should be removed > LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:35 > + var context = new webkitAudioContext(1, 44100, 44100); Best not to use hard-coded values here, and instead use the exact same pattern as the other JavaScriptAudioNode tests such as "javascriptaudionode.html" > LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:36 > + var node = context.createJavaScriptNode(4096, 0, 2); Please put this creation in a try/catch block to check for exceptions here > LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:40 > + Please add short comment explaining that the onaudioprocess function is doing nothing since we simply want to make sure that the processing logic in the implementation can handle 0 input channels and don't care about doing any processing. You might want to add a FIXME explaining that we could check the .inputBuffer attribute of the AudioProcessingEvent appropriately (don't need to add that part right now).
Raymond Toy
Comment 3 2012-05-08 11:44:14 PDT
Raymond Toy
Comment 4 2012-05-08 11:46:03 PDT
Comment on attachment 140592 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140592&action=review >> LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:7 >> +<title>JavaScriptAudioNode</title> > > <title> line should be removed Done. >> LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:35 >> + var context = new webkitAudioContext(1, 44100, 44100); > > Best not to use hard-coded values here, and instead use the exact same pattern as the other JavaScriptAudioNode tests such as "javascriptaudionode.html" Done. >> LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html:40 >> + > > Please add short comment explaining that the onaudioprocess function is doing nothing since we simply want to make sure that the processing logic in the implementation can handle 0 input channels and don't care about doing any processing. > You might want to add a FIXME explaining that we could check the .inputBuffer attribute of the AudioProcessingEvent appropriately (don't need to add that part right now). Comment and FIXME added.
Eric Seidel (no email)
Comment 5 2012-05-08 16:14:07 PDT
Comment on attachment 140753 [details] Patch Seems reasonable.
WebKit Review Bot
Comment 6 2012-05-08 16:23:20 PDT
Comment on attachment 140753 [details] Patch Clearing flags on attachment: 140753 Committed r116465: <http://trac.webkit.org/changeset/116465>
WebKit Review Bot
Comment 7 2012-05-08 16:23:25 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.