|
-
Dec 5th, 2000, 03:36 PM
#1
Thread Starter
Junior Member
I know there is a number of ways to play wavefiles...
How can I know when a file is done so I can make it play a different file in VB; always contiguous.
If anyone knows, I would appreciate it.
-
Dec 5th, 2000, 04:30 PM
#2
Frenzied Member
Im not even sure if MediaPlayer plays wavs but if it does:
MediaPlayer1_EndOfStream(all the parameters)
Mediaplayer1.Play
End Sub
retired member. Thanks for everything 
-
Dec 5th, 2000, 04:35 PM
#3
Play it synchronously, then the next line of code will only run when the WAV is finished.
-
Dec 5th, 2000, 09:02 PM
#4
Thread Starter
Junior Member
Do you mean use sndplay sound. I thought you could not play big wave files.........30 meg with sndplaysound.
To the person on the top........Thanks...........but can you play different sounds at the same time as the mmcontrol is playing.....
-
Dec 6th, 2000, 10:55 AM
#5
Frenzied Member
Take advantage of the Done event.
Before I issue the play command, I set a flag and then reset it in the Done event routine.
[code]
somewhere in the code of my doorprize drawing app:
If frmMain.mnuSound.Checked = True Then
bWaveFinished = False
' select a sound clip
iFileNum = iSelection Mod 8
MMControl.filename = App.Path & "\WINNER" & iFileNum & ".WAV"
MMControl.Command = "Open"
MMControl.Command = "Play"
While bWaveFinished = False
DoEvents
Wend
End If
.
.
Private Sub MMControl_Done(NotifyCode As Integer)
' Close the MCI
MMControl.Command = "Close"
bWaveFinished = True
End Sub
[\code]
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
|