This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17402 - (NoteOnOffInteraction): noteOn and noteOff (start and stop) interaction
Summary: (NoteOnOffInteraction): noteOn and noteOff (start and stop) interaction
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 12:28 UTC by Michael[tm] Smith
Modified: 2014-10-28 17:16 UTC (History)
4 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2012-06-05 12:28:00 UTC
Audio-ISSUE-53 (NoteOnOffInteraction): noteOn and noteOff interaction [Web Audio API]

http://www.w3.org/2011/audio/track/issues/53

Raised by: Philip Jägenstedt
On product: Web Audio API

What happens if noteOff is called before noteOn?

What happens if noteOn or noteOff is called twice with different values after each other?
Comment 1 Olivier Thereaux 2012-06-07 08:17:22 UTC
[admin] Assigning items currently being worked on by editor.
Comment 2 Olivier Thereaux 2012-06-07 15:00:46 UTC
Change set from the editor: 
https://dvcs.w3.org/hg/audio/rev/5614c60b62e1
Comment 3 Olivier Thereaux 2012-06-07 15:01:21 UTC
More feedback from Philip in http://lists.w3.org/Archives/Public/public-audio/2012AprJun/0432.html

«
We'd prefer if the conditions were defined strictly in terms of  
playbackState.

Suggested phrasing for noteOn: "If playbackState is not UNSCHEDULED_STATE,  
then the user agent must throw an InvalidStateError exception. Set  
playbackState to SCHEDULED_STATE."

Suggested phrasing for noteOff: "If playbackState is UNSCHEDULED_STATE,  
then the user agent must throw an InvalidStateError exception." followed  
by the steps to schedule a playback stop.

As you can tell, we don't think there's any point in disallowing multiple  
calls to noteOff. If we want to disallow it, a new playbackState will be  
needed. One can of course implement a hidden state, but it seems simpler  
and better to make readyState match reality.
»
Comment 4 Philip Jägenstedt 2012-06-08 08:28:28 UTC
Actually, my suggestion is still not good enough. Quoting <http://wiki.whatwg.org/wiki/Howto_spec#Dealing_with_exceptions>:

"It is important to state whether the algorithm should be terminate when the exception is thrown or not; in some cases, an algorithm will continue even after an exception is thrown (e.g. to do some cleanup)."

In other words, "and terminate these steps" is missing.

(That wiki page is a great read, we should take its advice on many issues.)
Comment 5 Olivier Thereaux 2012-08-24 15:03:55 UTC
Updating issue title to reflect (proposed) name changes from noteOn/noteOff to start/stop.
Comment 6 Olivier Thereaux 2014-10-28 17:13:45 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 7 Olivier Thereaux 2014-10-28 17:16:38 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.