|
-
Sep 28th, 2000, 06:15 PM
#1
Thread Starter
Junior Member
Is there any way to have the playsound api continuously loop a sound file? I been using:
Public Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
along with declaring it in the form as:
retval = PlaySound("path to sound file", 0&, &H20000)
and can only get the sound file to play once. I tried to use &H8 (read this value would loop from a book) instead of &H20000, but then the sound wouldn't play at all. Help, 'cause I'm stumped.
Jason
-
Sep 29th, 2000, 02:26 PM
#2
Use &H8 instead.
Code:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Sub Command1_Click()
'Play the WAV
PlaySound "C:\MyFile.wav", 0&, &H8
End Sub
-
Oct 4th, 2000, 07:38 AM
#3
Originally posted by Megatron
Use &H8 instead.
Don't you have to OR it? i.e:
Code:
PlaySound "C:\MyFile.wav", 0&, &H200000 OR &H8
or:
Code:
PlaySound "C:\MyFile.wav", 0&, &H200008 ' (Same result)
or am I wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|