|
-
Aug 31st, 2000, 03:05 AM
#1
Thread Starter
Lively Member
I wonder how to do that.
I want to play, let's say 4 .wav of about 2 Minutes 30 sec. each
one after the other and i want my app to wait until the previous
one is finished before starting the next one.
But i only get the last one. I don't want my app to freeze
either since i want to be able to close it when i press ESC.
So!
How do i make my .wavs to play one after the other?
If possible please provide codes.
Process by example is the best way to learn.
-
Aug 31st, 2000, 03:48 AM
#2
Fanatic Member
Have you tried using DoEvents between each wav file. Place the DoEvents in a Do While loop and do this for every wav. Something like:
Code:
Do While mplayer.stillexecuting
DoEvents
Loop
I couldn't give you the exact syntax b/c i don't know what way you are playing the wave files.
Gl,
D!m
PS.You could also place a timer and set the interval to a second and play the seond wave file after the timer reached the length of the first wave file then play the third wave files when the timer reached the length of the first 2 combined.
-
Aug 31st, 2000, 04:01 AM
#3
Use the SND_NOSTOP flag with the PlaySound function. It returns False if a sound is allready playing.
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 Const SND_NOSTOP = &H10
Private Const SND_ASYNC = &H1
Private Sub PlayMyWavFiles(sWavFileName As String)
Do While Not PlaySound(sWavFileName, 0&, SND_NOSTOP + SND_ASYNC)
DoEvents
Loop
End Sub
Good luck!
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
|