This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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?
[admin] Assigning items currently being worked on by editor.
Change set from the editor: https://dvcs.w3.org/hg/audio/rev/5614c60b62e1
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. »
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.)
Updating issue title to reflect (proposed) name changes from noteOn/noteOff to start/stop.
Web Audio API issues have been migrated to Github. See https://github.com/WebAudio/web-audio-api/issues
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.