Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

[RESOLVED] make a sound file repeat using WINMM.DLL

$
0
0
i am trying to make a sound file loaded from a resource file repeat until stopped using WINMM.DLL

Dim sndData() As Byte


Private Declare Function sndPlaySound Lib "WINMM.DLL" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As _
Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10

play the sound
sndData = LoadResData("hit", "SOUND")
sndPlaySound sndData(0), SND_LOOP

stop the sound
sndPlaySound ByVal 0, 0
how can this be done?

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>