Play sound fast

Nicola Mfb nicola.mfb at
Sun Jul 5 12:56:37 CEST 2009

2009/7/5 Sten Kvamme <sten at>:
> Buttons with some action sound (eg klick, boink or broken glass) should
> have minimal latency between touching the button and the sound.

To have ~0 latency you should integrate the sound playing in your
application, decode the sound in raw format with some library and take
it resident in ram. To play it use directly alsa-lib.
This may waste memory if sounds are big. A better solution may be to
have raw sounds decoded on SD and load them when needed.

Emit sounds on button press instead of button release helps :)


More information about the devel mailing list