|
-
Dec 23rd, 2000, 01:47 AM
#1
Thread Starter
Addicted Member
Hi !
playing wave files using API:
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
1-What are all the values of uFlags?
2-How can we stop playing a wave file started yo play using this API call
Thank You anyway!!
B.S Computer Science
M.S Computer Engineering
-
Dec 23rd, 2000, 03:31 AM
#2
Use the PlaySound API funtion instead which is the same as the sndPlaySound API function.
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 file
PlaySound "C:\MyFile.wav", 0&, &H1
End Sub
Private Sub Command2_Click()
'Stop the WAV file
PlaySound "C:\MyFile.wav", 0&, &H4
End Sub
-
Dec 23rd, 2000, 02:35 PM
#3
Hey Matthew
I've used PlaySound / sndPlaySound, but I can't play two sounds at the same time.
I've also done buffers correctly through direct sound to play two sounds at once, but is there a way to play 2 sounds at once, without using direct x/direct sound?
I was thinking of importing flash movies that are just wavs...
Masterguy
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
|