[chuck-users] Latency measurement for ChucK

Yonghao Wang wyonghao at gmail.com
Fri Jun 18 07:28:50 EDT 2010

Hello All,

I am new to ChucK but I've found it is very interesting and intuitive
tool! I am interested in Latency issues of audio host. I've measured
latencies on various hosts on standard Mac hardware (with on-board
Intel HDA standard soundcard) with WindowsXP/MacOSx/Linux etc. So far
linux has lowest overhead processing latency and also consistent as
good as Mac or even better.

I've tested  ChucK on Mac OSX. The code I used is standard ADC one

Buffer setting -> measured latency
16 samples -> 5ms
256 samples -> 20ms
512 samples -> 37ms

In the console log messages, it always says: number of buffers 8. At
sampling frequency of 44100Hz,  so in theory: latency  =

16 samples ->  2.9 ms
256 samples -> 46.4 ms
512 samples -> 92.9 ms

These two group of data doesn't seem consistent. I guess the buffer
structure in ChucK is quite different with other audio hosts (normally
they have both input buffer and output buffer). I am not quite
understand the maths, can anyone give me some clue? How are the 8
buffers in ChucK arranged? I guess some buffers are in parallel
otherwise the theoretical values wont be greater then measured values?

I will try to test it on Linux/Jack soon that may be more consistent
in terms of latency. Many thanks


More information about the chuck-users mailing list