procedure PlaySoundAA(WavFileName: String); var s: Array[0..79] of char; begin {Convert filename to a null-terminated string} StrPCopy(s, WavFileName); {Play the sound asynchronously} sndPlaySound(s, 0); {see mmsystem.hlp for other values} end;调用: PlaySoundAA('C:\a.wav');
var
s: Array[0..79] of char;
begin
{Convert filename to a null-terminated string}
StrPCopy(s, WavFileName);
{Play the sound asynchronously}
sndPlaySound(s, 0); {see mmsystem.hlp for other values}
end;调用:
PlaySoundAA('C:\a.wav');