Re: start/stop on AudioBufferSourceNodes without a buffer?

On Thu, Oct 31, 2013 at 1:17 PM, Karl Tomlinson <
karlt+public-audio@karlt.net> wrote:

> 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.
>

Chromium doesn't currently throw on exceptions, but it will soon. And it
will throw on stop() in this case, because start() isn't considered to have
actually started since there's no buffer.

But clarification on this point would be good.

--
Ray

Received on Thursday, 31 October 2013 21:12:54 UTC