- From: Raymond Toy <rtoy@google.com>
- Date: Mon, 19 Mar 2012 12:51:14 -0700
- To: Yves Raimond <Yves.Raimond@bbc.co.uk>
- Cc: public-audio@w3.org
Received on Monday, 19 March 2012 19:51:43 UTC
On Mon, Mar 19, 2012 at 4:34 AM, Yves Raimond <Yves.Raimond@bbc.co.uk>wrote: > Hello! > > I was recently wondering about a few aspects of JavascriptNode. I was > wondering why, in Chrome Linux, every demo involving sound generated by a > JavascriptNode was stuttering, e.g. [0]. It does look like the frequency of > the stutter changes as the size of the node buffer changes, which seems to > indicate that each silence is actually the time it takes to run the process > code. Demos involving just reading from a wavetable don't seem to suffer > from that. Of course a way around that would be to have an optimised > oscillator node, which has been discussed before on this mailing list. > I believe this is an artifact of how chrome linux handles audio. If you change kBufferSize to 2048, the tones will come out as expected. There is an internal buffer of size 2048 and this causes the stuttering you see with a JavaScriptNode. You need to generate at least 2048 samples. Ray
Received on Monday, 19 March 2012 19:51:43 UTC