dmitry boyarintsev <skalogryz.li...@gmail.com> wrote:

On Mon, Jun 14, 2010 at 5:37 PM, Graeme Geldenhuys
<graemeg.li...@gmail.com> wrote:

Has anybody managed to play sound files under both Linux and Windows?
Does FPC have a cross-platform API or FCL class for this?

I'd offer using OpenAL, however it requires proper libraries to be
installed on Linux (afaik installed by default in all modern desktop
distribs), and proper .dlls available for Windows.

There's proper example in FCL how to use OpenAL to play .wav, .ogg .mp3 files.

I second that, AL is worth considering. It was very easy for me to use, at 
least once I found a decent WAV loader.

I have a little "OpenAL kit" for the Mac here:

http://www.ragnemalm.se/lightweight/openal_fpc.zip

On the Mac it it great: always installed, much better API than Core Audio, and 
portable. Havn't tried it on Linux och Windows though. And there is one problem 
that AL doesn't help me with (apart from loading WAV) and that is to play 
music. Uncompressed sound isn't useful for music. I can play that with 
Quicktime, but I'd like to use something cross-platform.


/Ingemar


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to