Re: playing & re-playing 7 .wav files
- From: Mr. Murad Jamal <MrMuradJamal@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 27 May 2006 07:22:01 -0700
thanx alot this is awesome .. i will try to use background worker for putting
it on its own thread !!
"gene kelley" wrote:
On Thu, 25 May 2006 06:52:02 -0700, Mr. Murad Jamal.
<MrMuradJamal@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Dear guys,
I have 7 .wav files in C:\ directory [named: 1.wav, 2.wav, ..., 7.wav], I'd
play them all by clicking on "cmdStart" button on a Visual Basic 2005-
Windows Application Form.
I thought I should use this segment of code to get this thing done:
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdStart.Click
Dim i As Integer = 1
While i < 8
My.Computer.Audio.Play("C:\" & i & ".wav",
AudioPlayMode.Background)
i += 1
End While
End Sub
But when I run the application, it ONLY plays the last .wav file (7.wav) !!
What I need is to play them all, one by one, that is, 1.wav .. then 2.wav ..
then ..etc.. until 7.wav, AND i also want to re-loop [re-play these files]
this operation ( that is, after finishing the first loop of these 7 .wav
files, the application should start over again from 1.wav ... till 7.wav ...
and so on ..) !
what code line or segment should i add to the above segment to get this done
!!
I'd highly appreciate your help guys !!
Thanx in advance !
If this is simply background sounds for the app, this will proabaly
work (air code), but you will probably need to put this in it's own
thread for best performance.
Dim i As Integer = 1
While i < 8
My.Computer.Audio.Play("C:\" & i & ".wav",
AudioPlayMode.WaitToComplete)
If i = 7 then
i = 1
Else
i += 1
End While
End Sub
Gene
- References:
- Re: playing & re-playing 7 .wav files
- From: gene kelley
- Re: playing & re-playing 7 .wav files
- Prev by Date: Re: VB.NET events creates a hidden delegate, but how do I access it?
- Next by Date: Re: string operations
- Previous by thread: Re: playing & re-playing 7 .wav files
- Next by thread: error handle
- Index(es):
Relevant Pages
|