- From: Jory <me@jory.org>
- Date: Tue, 27 May 2014 16:14:00 +0200
- To: Arnau Julia <Arnau.Julia@ircam.fr>
- Cc: "public-audio-dev@w3.org" <public-audio-dev@w3.org>
- Message-Id: <0913B0F1-B2F8-44C7-AA8B-292C73B38077@jory.org>
Is that true if your hardware sample rate is set to 48kHz? Jory me@jory.org http://studio.jory.org > On May 27, 2014, at 16:06, Arnau Julia <Arnau.Julia@ircam.fr> wrote: > > Hello, > > I have a question about the value of AudioContext.currentTime. If I'm not wrong, the currentTime is a high-precision clock exposed in JavaScript as a floating-point number of seconds since the AudioContext was created. Therefore, as I understand, if I want to start two sources at a specific time I can't do something like this, > > function start(){ > source1.start(audioContext.currentTime+1); > source2.start(audioContext.currentTime+1); > } > > because it's not possible to guarantee that the currentTime for these two instructions will be the same. Nevertheless, I did an experiment that show how the currentTime is increased like a "k-rate", that is to say, is increased as a multiple of blockTime. I have an experiment on this: http://jsfiddle.net/SN8Vm/5/ > As you can see, the currentTime is always a multiple of blockTime = 128/44100. > > Is the communication between the JavaScript thread and the audio thread done for each block-size? And then is the currentTime exposed in JavaScript just updated for each bloc-size? > > Thank you! > > Arnau
Received on Tuesday, 27 May 2014 14:14:56 UTC