Re: Audio-ISSUE-53 (NoteOnOffInteraction): noteOn and noteOff interaction [Web Audio API]

On Thu, 24 May 2012 17:27:53 +0200, olivier Thereaux  
<olivier.thereaux@bbc.co.uk> wrote:

>
> On 15 May 2012, at 16:23, Audio Working Group Issue Tracker wrote:
>
>> 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?
>
> This issue is now Pending Review, per  
> https://dvcs.w3.org/hg/audio/rev/5614c60b62e1
>

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.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Friday, 25 May 2012 13:09:25 UTC