- From: Raymond Toy <rtoy@google.com>
- Date: Wed, 22 Jan 2014 12:21:51 -0800
- To: Chris Wilson <cwilso@google.com>, "public-audio@w3.org" <public-audio@w3.org>, Raymond Toy <rtoy@google.com>
Received on Wednesday, 22 January 2014 20:22:19 UTC
On Wed, Jan 22, 2014 at 10:50 AM, Karl Tomlinson < karlt+public-audio@karlt.net> wrote: > Chris Wilson writes: > > > Do we want to do that, or just throw an exception when start() is called > > when there's no buffer set (or something like that)? > > Could a slight change in order be a common pattern? e.g. > > c = new AudioContex(); > c.decodeAudioData(data, function () { > s = c.createBufferSource(); > s.connect(c,destination); > s.start(0); > s.buffer = data; > }); > If you interchanged s.start(0) and s.buffer=data, then I think that's a common pattern. I think this has the same issue as before where you start an empty buffer and assign a new buffer right away. Probably nothing gets played. >From the bug report, however, this presents an issue with iOS. If there are no strong opinions either way, I would prefer backward compatibility in this case. I suspect many websites will break. In fact, even one of Chris R's demos breaks because of this. Based on the code, I think this was the original intent: play the new buffer when it is assigned.
Received on Wednesday, 22 January 2014 20:22:19 UTC