[fpc-pascal]Playing sounds in Fpc?

Andreas K. Foerster AKFoerster at nikocity.de
Mon Jul 16 15:47:26 CEST 2001


Michael Lang wrote:

> I wrote quite a lot of stuff in BPC for DOS, but do not have that much
> experience in Win32 programming. I'd like to have some examples of
> code to play wave and midi files. I'm not looking for finished
> players, where one just clicks with the mouse, to play a file. I'd
> like to have code, with which one can just play little sounds.

It's very primitive, but it works for win32:

   uses Dos;
   
   procedure PlayWave(WaveFile:String);
   begin
     exec('C:\Windows\sndrec32.exe', '/play /close /embedding
'+WaveFile);
   end;


Does anybody know the equivalent parameters for the "media player"?

-- 
Tschuess
	Andreas

http://homepage.ruhr-uni-bochum.de/Andreas.Foerster/




More information about the fpc-pascal mailing list