Graeme Geldenhuys schrieb:
Hi,

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

If so, what sound format's are supported?  ogg, wav, mp3?

We have developed some kind of API to play a .wav file on both Windows and Mac. The Windows version is easy (below), the Mac version is long (400 lines).

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 :-) ...

Regards,
Alexander


uses windows, mmsystem;

procedure PlaySoundFile(filename: string);
begin
 PlaySound(pchar(filename), 0, SND_FILENAME + SND_ASYNC);
end;


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

Reply via email to