Play sound fast

Sten Kvamme sten at
Sun Jul 5 21:10:08 CEST 2009

sön 2009-07-05 klockan 09:57 -0400 skrev Nicolas Dufresne:
> Le dimanche 05 juillet 2009 à 14:37 +0200, Visti Andresen a écrit :
> > I prefer using RAM and have the sound swapped out if memory is
> > tight...
> Personally I would try other solution before going to the RAM solution.
> The RAM solution will move the latency to your program startup time,
> which is also a big issue. You could also decode and embed the sound in
> a raw char* format but that will make the program less configurable (it
> will also increase you program size, and thus slow down startup time).
> When you launch a sub-process, you need to load all the file to RAM
> first, which is not the case for an audio file. For this reason, I would
> suggest to test usinga streaming stack like GStreamer library. If all
> your pipeline are brought to pause state (preroll and buffering done),
> latency should be very low when time comes to play. You may get even
> lower latency by enabling mmap() mode of your filesrc element.
> Best regards,
> Nicolas
If I can avoid C and stick to Erlang and the linux command line, eg. cat /dev/audio, it would be a better solution. Erlang is like Java
run in a virtual machine and like Java a JNI solution is not "pure". I
can - just like in Java - compile a C function and use in Erlang as a
normal function but it would not be portable.
> _______________________________________________
> devel mailing list
> devel at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad
Url : 

More information about the devel mailing list