VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Play a .Wav file a few lines of code (very hard... ;)

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


Rate Play a .Wav file a few lines of code (very hard... ;)



Dim Response As Integer

Const SYNC = 1

If (Dir(File) <> "") Then
    Response = sndPlaySound(ByVal CStr(File), SYNC)
End If
End Sub

Download this snippet    Add to My Saved Code

Play a .Wav file a few lines of code (very hard... ;) Comments

No comments have been posted about Play a .Wav file a few lines of code (very hard... ;). Why not be the first to post a comment about Play a .Wav file a few lines of code (very hard... ;).

Post your comment

Subject:
Message:
0/1000 characters