PDA

Click to See Complete Forum and Search --> : Wave Files !! Help


Mimo
Dec 23rd, 2000, 12:47 AM
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!!

Dec 23rd, 2000, 02:31 AM
Use the PlaySound API funtion instead which is the same as the sndPlaySound API function.

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, 01:35 PM
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