NEW 102461
Exception should be thrown when start or close of AudioBufferSourceNode is called at the wrong time.
https://bugs.webkit.org/show_bug.cgi?id=102461
Summary Exception should be thrown when start or close of AudioBufferSourceNode is ca...
Li Yin
Reported 2012-11-15 21:02:23 PST
Spec:https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioSourceNode start may only be called one time and must be called before stop is called or an exception will be thrown. stop must only be called one time and only after a call to start or stop, or an exception will be thrown.
Attachments
Patch (13.69 KB, patch)
2012-11-16 06:01 PST, Li Yin
no flags
Patch (13.57 KB, patch)
2013-02-26 18:44 PST, Li Yin
bfulgham: review-
Li Yin
Comment 1 2012-11-15 21:57:01 PST
If stop only can be called one time, it should be impossible that stop is called after stop. So maybe this is a defect of W3C Spec.
Li Yin
Comment 2 2012-11-15 21:57:58 PST
"stop must only be called one time and only after a call to start or stop, or an exception will be thrown." should be stop must only be called one time and only after a call to start, or an exception will be thrown.
Li Yin
Comment 3 2012-11-16 06:01:34 PST
Li Yin
Comment 4 2012-11-16 06:21:58 PST
(In reply to comment #1) > If stop only can be called one time, it should be impossible that stop is called after stop. So maybe this is a defect of W3C Spec. And after audio rendering is complete, the call of stop will throw exception as well. So maybe it will be more reasonable if we describe it like this: start can be called only when playbackState is UNSCHEDULED_STATE, or INVALID_STATE_ERR exception will be thrown. stop can be called only when playbackState is SCHEDULED_STATE or PLAYING_STATE, or NVALID_STATE_ERR exception will be thrown. Hi Chris, Do you think it is reasonable? If yes, I will file a bug in W3C for the more discussion.
Li Yin
Comment 5 2012-11-25 21:07:35 PST
Hi Chirs, Do you think it is reasonable?
Praveen Jadhav
Comment 6 2013-02-25 19:23:23 PST
*** Bug 109674 has been marked as a duplicate of this bug. ***
Li Yin
Comment 7 2013-02-25 21:29:14 PST
Hi Praveen Jadhav, According to the newest spec, the exception should be thrown, you can see from https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
Praveen Jadhav
Comment 8 2013-02-25 21:47:59 PST
(In reply to comment #7) > Hi Praveen Jadhav, > According to the newest spec, the exception should be thrown, you can see from https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode Well, I too was of same opinion earlier. But if you see the discussion we had in Bug 109674, "raises(DOMException)" is being phased out from Web IDL spec. The exception mechanism is changed to use "DOMString" rather than "raises(DOMException)". After going through your patch, I realised that it is identical to what I had proposed in bug 109674. Hence, I have made my bug as DUPLICATE.
Li Yin
Comment 9 2013-02-25 22:43:11 PST
I don't understand what you pointed, could you please add the detailed information? Do you mean all the Web IDL spec won't raise DOMException or only for web audio spec?
Praveen Jadhav
Comment 10 2013-02-25 22:55:45 PST
(In reply to comment #9) > I don't understand what you pointed, could you please add the detailed information? For more details, you may refer to the discussion between Chris Rogers and Kentaro Hara in Bug 105058 and in Bug 105977. > Do you mean all the Web IDL spec won't raise DOMException or only for web audio spec? "raises(DOMException)" will be spec from Web IDL and not only from WebAudio(as per my understanding while discussing in Bug 109674). Chris, any comments here?
Praveen Jadhav
Comment 11 2013-02-25 22:56:56 PST
(In reply to comment #10) > (In reply to comment #9) > > I don't understand what you pointed, could you please add the detailed information? > > For more details, you may refer to the discussion between Chris Rogers and Kentaro Hara in Bug 105058 and in Bug 105977. > > > Do you mean all the Web IDL spec won't raise DOMException or only for web audio spec? > > "raises(DOMException)" will be spec from Web IDL and not only from WebAudio(as per my understanding while discussing in Bug 109674). > > Chris, any comments here? I meant "spec out" from Web IDL.
Kentaro Hara
Comment 12 2013-02-26 00:53:00 PST
Comment on attachment 174661 [details] Patch _The implementation looks good. Once the spec issue is resolved, I'm happy to r+ it.
Kentaro Hara
Comment 13 2013-02-26 00:55:08 PST
Comment on attachment 174661 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174661&action=review > LayoutTests/webaudio/audiobuffersource-exception.html:11 > +<div id="description"></div> > +<div id="console"></div> > + Nit: These are not necessary. > LayoutTests/webaudio/audiobuffersource-exception.html:34 > + if (window.testRunner) { > + testRunner.dumpAsText(); > + testRunner.waitUntilDone(); > + } > + Nit: I think these are not necessary.
Li Yin
Comment 14 2013-02-26 18:44:12 PST
Li Yin
Comment 15 2013-02-26 18:46:56 PST
(In reply to comment #12) > (From update of attachment 174661 [details]) > _The implementation looks good. Once the spec issue is resolved, I'm happy to r+ it. Thanks Kentaro's view. The new patch fixed some nits.
Kentaro Hara
Comment 16 2013-02-26 19:25:57 PST
crogers: WDYT about the patch from the perspective of the spec?
Brent Fulgham
Comment 17 2016-03-14 12:35:36 PDT
Comment on attachment 190413 [details] Patch This patch doesn't apply against the current trunk sources. If you are interested in getting this patch integrated, please revise to match our current sources and upload a new patch. I apologize for the inconvenience.
Note You need to log in before you can comment on or make changes to this bug.