Graeme Geldenhuys schrieb:
On 14/06/2010, Alexander Grau wrote:
If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a
note and we will donate the Mac code for it :-) ...
Thanks for that. A quick test removing the SND_ASYNC option plays
multiple sound files in quick succession - just what I wanted. I'll
experiment with libsndfile tomorrow, to see if I can accomplish the
same under Linux.
As long as I can find out the various options for each platform, I can
very easily put together my own sound playing API/Class, so that is
not much of a problem.
For Linux, I think it can be simple as opening a file and writing the
raw audio data to it - using a simple WAV header reader or even an MP3
decoder for FPC, it should be possible to directly use the sound device
(/dev/dsp):
http://www.opensound.com/pguide/audio.html
This is not the most elegant (or easiest) solution, however it has no
dependencies to any libraries :)
I think for getting a simple playSoundFile() API to FPC/LCL on all
platforms, dependencies to 3rd-party libs can be avoided.
Regards,
Alexander
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal