[Openal] buffer size

nic at weartronics.com nic at weartronics.com
Thu Nov 9 00:48:05 PST 2006


Dear OpenAL list,

I read that with low-latency APIs like ASIO the buffer size can be as 
small as 2ms, however with higher level APIs like OpenAL, a typical 
minimum buffer size might be closer to 10ms (which is acceptable latency 
for my application).

I have tried using a total buffer size of 512 samples at 48000Hz (approx 
10ms) divided between 16 buffers, however this is running right on the 
edge (e.g. playback stops as soon as I move the window). All processed 
buffers are being unqueued, refilled and requeued in a tight loop on a 
separate thread with only a "Sleep(1);" preventing it from running 
continuously. CPU usage is very low (less than 10%).

I have tried increasing the buffer size to 4096 samples and this helps a 
lot. Moving the window becomes possible without any interruptions, but 
playback still stops if I switch to another application etc... However, 
80ms is a huge latency and is not acceptable for my application!

Please could you let me know the usual buffer sizes and latencies for 
OpenAL on Windows, and any suggestions for preventing the interruption 
which stops the playback?

Thanks,

Nic


More information about the Openal mailing list