Play sound fast
talpa at talpa.dk
Sun Jul 5 14:37:53 CEST 2009
On Sun, 5 Jul 2009 12:56:37 +0200
Nicola Mfb <nicola.mfb at gmail.com> wrote:
> 2009/7/5 Sten Kvamme <sten at kvamme.se>:
> > 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.
I prefer using RAM and have the sound swapped out if memory is tight...
(But then again I like using swap memory, not every one may be a "swap fan")
> Emit sounds on button press instead of button release helps :)
> devel mailing list
> devel at lists.openmoko.org
More information about the devel