by DiskJunky (16 Submissions)
Category: Sound/MP3
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 14th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Play a .Wav file a few lines of code (very hard... ;)
API Declarations
'API function to play .wav
Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Dim Response As Integer
Const SYNC = 1
If (Dir(File) <> "") Then
Response = sndPlaySound(ByVal CStr(File), SYNC)
End If
End Sub