Re: [web-audio-api] (JSWorkers): ScriptProcessorNode processing in workers (#113)

> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17415#80) by Robert O'Callahan (Mozilla) on W3C Bugzilla. Mon, 30 Jul 2012 00:49:41 GMT

(In reply to [comment #59](#issuecomment-24244648))
> AFAICT, the noteOn & AudioParam interfaces were designed for making it possible
> to schedule sample accurate audio actions ahead of time. I think that it
> *should* be possible to use it for providing gap-less audio playback (typically
> using a few AudioBuffers in a multi-buffering manner and scheduling them with
> AudioBufferSourceNodes). The problem, as it seems, is that you need to
> accommodate for possible jittering and event drops, possibly by introducing a
> latency (e.g, would it work if you forced a latency of 0.5s?).

I think a solution that uses setInterval() to schedule frequent JS callbacks, checks AudioContext.currentTime to measure the progress of the audio clock, and uses AudioBufferSourceNodes to queue playback of generated audio buffers, should work as well as any other, providing the Web Audio implementation is adequate. Incremental GC might also be required.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/113#issuecomment-24244762

Received on Wednesday, 11 September 2013 14:33:46 UTC