aftab2003
asked on
WAV file rewind and play
Hi,
I want to rewind a wav file and play it three or four times. How do I do that ?
The following plays only once :
MMControl1.DeviceType = WaveAudio
MMControl1.Notify = False
MMControl1.Wait = False
MMControl1.Shareable = False
MMControl1.FileName = "C:\1.WAV"
MMControl1.Command = "Open" 'app.Path &
MMControl1.Command = "PlaY"
'WaitForEventsToFinish 100
MMControl1.Command = "Rewind"
MMControl1.Command = "PlaY"
MMControl1.Command = "Back"
MMControl1.Command = "PlaY"
I want to rewind a wav file and play it three or four times. How do I do that ?
The following plays only once :
MMControl1.DeviceType = WaveAudio
MMControl1.Notify = False
MMControl1.Wait = False
MMControl1.Shareable = False
MMControl1.FileName = "C:\1.WAV"
MMControl1.Command = "Open" 'app.Path &
MMControl1.Command = "PlaY"
'WaitForEventsToFinish 100
MMControl1.Command = "Rewind"
MMControl1.Command = "PlaY"
MMControl1.Command = "Back"
MMControl1.Command = "PlaY"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect - Thank you very much
Form1:
--------------
Private iRepeat As Integer, bExecuting As Boolean
Private Sub Form_Load()
iRepeat = 4
MMControl1.DeviceType = WaveAudio
MMControl1.FileName = "c:\test.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Private Sub MMControl1_Done(NotifyCode
If NotifyCode = mciNotifySuperseded Then Exit Sub
iRepeat = iRepeat - 1
If iRepeat > -1 Then
MMControl1.Command = "Prev"
MMControl1.Command = "Play"
Debug.Print Timer
Else
MMControl1.Command = "Close"
End If
End Sub