RESOLVED FIXED 91364
It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
https://bugs.webkit.org/show_bug.cgi?id=91364
Summary It is invalid when both numberOfInputChannels and numberOfOutputChannels to b...
Li Yin
Reported 2012-07-16 00:26:09 PDT
From Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section numberOfInputChannels and numberOfOutputChannels determine the number of input and output channels. It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
Attachments
Patch (5.35 KB, patch)
2012-07-16 01:12 PDT, Li Yin
no flags
Patch (6.48 KB, patch)
2012-07-20 18:09 PDT, Li Yin
no flags
Li Yin
Comment 1 2012-07-16 01:12:10 PDT
Kentaro Hara
Comment 2 2012-07-18 01:08:14 PDT
Looks reasonable. (I am not an AudioContext guy though.)
Li Yin
Comment 3 2012-07-18 01:23:37 PDT
(In reply to comment #2) > Looks reasonable. (I am not an AudioContext guy though.) Thanks for your review.
Raymond Toy
Comment 4 2012-07-19 11:04:51 PDT
Comment on attachment 152496 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152496&action=review Just a few minor comments on the pass/fail messages. Otherwise it looks good. Should we test the case where inputs = 0 and outputs = 2 and inputs = 2 and outputs = 0? > LayoutTests/webaudio/javascriptaudionode.html:92 > + testFailed("Exception should be thrown for both of numberOfInputChannels and numberOfOutputChannels to be zero."); Slight grammatical fix: "Exception should be thrown when both numberOfInputChannels and numberOfOutputChannels are zero." > LayoutTests/webaudio/javascriptaudionode.html:94 > + testPassed("Exception was thrown for both of numberOfInputChannels and numberOfOutputChannels to be zero."); "Exception was thrown when both numberOfInputChannels and numberOfOutputChannels are zero." > LayoutTests/webaudio/javascriptaudionode.html:101 > + testFailed("Exception should not be thrown."); Be more explicit on failure to match the pass case? Something like "Exception should not be thrown when numberOfInputChannels = 1 and numberOfOutputChannels = 0." > LayoutTests/webaudio/javascriptaudionode.html:108 > + testFailed("Exception should not be thrown."); Be more explicit on failure to match the pass case? Something like "Exception should not be thrown when numberOfInputChannels = 0 and numberOfOutputChannels = 1."
Li Yin
Comment 5 2012-07-20 18:09:58 PDT
Li Yin
Comment 6 2012-07-20 18:12:23 PDT
(In reply to comment #4) > (From update of attachment 152496 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=152496&action=review > > Just a few minor comments on the pass/fail messages. Otherwise it looks good. Should we test the case where inputs = 0 and outputs = 2 and inputs = 2 and outputs = 0? > > > LayoutTests/webaudio/javascriptaudionode.html:92 > > + testFailed("Exception should be thrown for both of numberOfInputChannels and numberOfOutputChannels to be zero."); > > Slight grammatical fix: > > "Exception should be thrown when both numberOfInputChannels and numberOfOutputChannels are zero." > > > LayoutTests/webaudio/javascriptaudionode.html:94 > > + testPassed("Exception was thrown for both of numberOfInputChannels and numberOfOutputChannels to be zero."); > > "Exception was thrown when both numberOfInputChannels and numberOfOutputChannels are zero." > > > LayoutTests/webaudio/javascriptaudionode.html:101 > > + testFailed("Exception should not be thrown."); > > Be more explicit on failure to match the pass case? Something like > > "Exception should not be thrown when numberOfInputChannels = 1 and numberOfOutputChannels = 0." > > > LayoutTests/webaudio/javascriptaudionode.html:108 > > + testFailed("Exception should not be thrown."); > > Be more explicit on failure to match the pass case? Something like > > "Exception should not be thrown when numberOfInputChannels = 0 and numberOfOutputChannels = 1." Done. Thanks for your comments.
Kenneth Russell
Comment 7 2012-07-24 16:25:23 PDT
Raymond, is this patch ready to go in your opinion?
Raymond Toy
Comment 8 2012-07-24 16:41:04 PDT
(In reply to comment #7) > Raymond, is this patch ready to go in your opinion? Yes, pretty much. BUT, there has been some recent (side) discussion on the W3C audio list about whether JavaScriptNode's should allow 0 inputs. I can't seem to find the relevant messages right now, so perhaps we should hold off on this.
Kenneth Russell
Comment 9 2012-07-24 16:50:45 PDT
Comment on attachment 153633 [details] Patch OK. I'm clearing the review bit in this case. Please request review again once this is determined.
Li Yin
Comment 10 2012-07-24 18:29:30 PDT
(In reply to comment #8) > (In reply to comment #7) > > Raymond, is this patch ready to go in your opinion? > > Yes, pretty much. > > BUT, there has been some recent (side) discussion on the W3C audio list about whether JavaScriptNode's should allow 0 inputs. I can't seem to find the relevant messages right now, so perhaps we should hold off on this. Hi Raymond, could you please add some detailed information about this discussion? I can't find it in recent mail list. Thanks.
Raymond Toy
Comment 11 2012-07-25 08:54:39 PDT
(In reply to comment #10) > (In reply to comment #8) > > (In reply to comment #7) > > > Raymond, is this patch ready to go in your opinion? > > > > Yes, pretty much. > > > > BUT, there has been some recent (side) discussion on the W3C audio list about whether JavaScriptNode's should allow 0 inputs. I can't seem to find the relevant messages right now, so perhaps we should hold off on this. > > Hi Raymond, could you please add some detailed information about this discussion? I can't find it in recent mail list. > Thanks. I can't find the discussion either. But the spec clearly allows 0 inputs, and your patch allows that and clearly disallows the case when the number of inputs and outputs are both 0. This looks fine to me. Sorry for the trouble.
Kenneth Russell
Comment 12 2012-07-25 14:10:39 PDT
Comment on attachment 153633 [details] Patch Thanks Raymond. r=me
WebKit Review Bot
Comment 13 2012-07-25 14:34:15 PDT
Comment on attachment 153633 [details] Patch Clearing flags on attachment: 153633 Committed r123662: <http://trac.webkit.org/changeset/123662>
WebKit Review Bot
Comment 14 2012-07-25 14:34:20 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.