- From: Yves Raimond <Yves.Raimond@bbc.co.uk>
- Date: Mon, 19 Mar 2012 21:09:56 +0000
- To: Raymond Toy <rtoy@google.com>
- Cc: public-audio@w3.org
On Mon, Mar 19, 2012 at 12:51:14PM -0700, Raymond Toy wrote: > 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. You're absolutely right - setting the buffer size to 2048 samples gets rid of the stuttering - many thanks for that! Best, y > > Ray
Received on Monday, 19 March 2012 21:10:26 UTC