VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Play .WAV (example 1)

Found on the World Wide Web  (15 Submissions)   Windows System Services   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Check if soundcard exist and then play a wave-file. https://137.56.41.168:2080/VisualBasicSource/vb4playwav.txt

API Declarations
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Declare Function waveOutGetNumDevs Lib "winmm" () As Long
Global Const SND_SYNC = &H0 'just after the sound is ended exit function
Global Const SND_ASYNC = &H1 'just after the beginning of the sound exit function
Global Const SND_NODEFAULT = &H2 'if the sound cannot be found no error message
Global Const SND_LOOP = &H8 'repeat the sound until the function is called again
GLOBAL Const SND_NOSTOP = &H10 'if currently a sound is played the function will return without playing the selected sound
Global Const Flags& = SND_ASYNC Or SND_NODEFAULT

Rate Play .WAV (example 1) (38(38 Vote))
Play .WAV (example 1).bas

Play .WAV (example 1) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters