Recent

Author Topic: Wav file player code  (Read 511 times)

TBMan

  • Sr. Member
  • ****
  • Posts: 350
Wav file player code
« on: February 22, 2025, 09:55:51 am »
I found this tonight googling around. Just pass the path to the wav file. The wav plays in the background.

Code: Pascal  [Select][+][-]
  1.  
  2. uses windows, mmsystem;
  3.  
  4. procedure PlaySoundFile(filename: string);
  5. begin
  6. PlaySound(pchar(filename), 0, SND_FILENAME + SND_ASYNC);
  7. end;        
  8.  
  9.  
  10.  
Barry

Newest game (clone),
Missile Commander:
https://www.youtube.com/watch?v=tgKz0cxog-k

 

TinyPortal © 2005-2018