Play sound fast
sten at kvamme.se
Sun Jul 5 20:47:05 CEST 2009
sön 2009-07-05 klockan 04:44 -0700 skrev Ben Wong:
> Nicola and Abelenda have given you the correct solutions (direct
> library calls or a sound daemon). Here's an incorrect solution that
> has the sole benefit of being dead simple.
> cat click.au > /dev/audio
> You'll want to convert the sound files to au format (Mu-law, 8kHz,
> mono) using: sox foo.wav -r 8000 -c 1 -U foo.au.
> Although a brain dead kludge, writing directly to /dev/audio can
> sometimes be useful. Just don't tell anyone I told you about it. ;-)
I kind of like KISS solutions and this one fits my programming
environment quite nice (I can use C libraries but I am a purist Erlang
I recorded a wav, converted to au with sox and cat to /dev/audio
Latency was < 0.5 sec but the file was played twice??
> 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.
> > I have tested mplayer, madplay and aplay and mplayer is the slowest,
> > aplay is the fastest with < 1sec latency. Are there faster players
> > around? I found that the timing corresponds to the player binary file
> > size, where mplayer is 2884588, madplay is 84028 and aplay is 54284.
> > So, what I am looking for is maybe a smaller player than aplay.
> > _______________________________________________
> > devel mailing list
> > devel at lists.openmoko.org
> > https://lists.openmoko.org/mailman/listinfo/devel
> devel mailing list
> devel at lists.openmoko.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad
Url : http://lists.openmoko.org/pipermail/devel/attachments/20090705/19d3fc5b/attachment.pgp
More information about the devel