Re: start/stop on AudioBufferSourceNodes without a buffer?

Raymond Toy writes:

> What should happen in the following:
>
> c = new AudioContext()
> s = c.createBufferSource()
> s.start()
> s.stop()
>
> The source s has no associated buffer, so what does start() do? Nothing?
>
> And should stop() throw an error or not?

If |buffer| can be set after stop() is called (see [1]) then
stop() cannot throw.  I don't think stop needs to throw anyway.

Perhaps start() and/or stop() should still affect when ended is
dispatched even if no buffer gets set later, but Gecko currently
doesn't dispatch ended without a buffer.  I guess "playback of the
buffer" never starts, so it doesn't finish.  I think the spec is
unclear here.

[1] http://lists.w3.org/Archives/Public/public-audio/2013JulSep/1866.html

Received on Thursday, 31 October 2013 20:18:44 UTC