[Openal-devel] OpenAL soft delays played sounds

Chris Robinson chris.kcat at gmail.com
Sat Oct 11 09:54:44 PDT 2008


On Saturday 11 October 2008 09:19:01 am Lukasz Pawelczyk wrote:
> The sound plays delayed compared to openal-si. This isn't big, I'd say
> 0.2-0.3 sec, for some might not be even hearable but it is there. Can
> hear that quite clearly when shooting some lasers f.e., or moving mouse
> over menus that produce sound (click). And for me it's annoying. Firstly
> I thought there was something wrong with X3, but when I've noticed it on
> another game I've downgraded to openal-si. Statics welcome back but no
> sound delay (using the same game binary).

Hi.

What sound system are you using (OSS, ALSA, PulseAudio, etc)?  PulseAudio can 
add a bit more delay since it doesn't support mmap through ALSA, and can do 
its own software mixing. If you can disable PulseAudio and use ALSA's dmix 
device, with mmap enabled, it should work better.

> I just noticed that reducing "refresh" helps here. 2048 works pretty well,
> but below that I start to hear statics (with mmap). Is it supposed to work
> that way?  

Reducing refresh will help with latency, but makes it more prone to skipping 
(static) from CPU spikes and/or the library's lock being held too long for 
functions to complete.

BTW, just having mmap on doesn't gaurantee it'll be used. If your ALSA driver 
(or PulseAudio, if you're using that) doesn't support mmap, it'll 
automatically be disabled.


More information about the Openal-devel mailing list