Here is the Continuous_Play function and the subroutine with a timer
that plays the files.


Function Continuous_Play(dObj)
On Error Resume Next
If Continuous = 0 Then 
Continuous = 1
Speak ""
Speak "Continuous play on "
Sleep 300

Else
Continuous = 0
Speak ""
Speak "Continuous play off "
Sleep 300
I = Total+1
SOAudioKit.Stop MySoundID
SOAudioKit.Invalidate MySoundID
End If

If Continuous = 1 Then
I = Start

For I = Start To Total
FileName = ScriptPath & "\" & MyFolder & "\" & cStr(MyArray(I-1)) 
PlayFile FileName

If Continuous = 0 Then
I = Total+1
End If

Next

End If
On Error Goto 0
End Function

sub playFile(FileName)
On Error Resume Next
If Continuous = 0 Then 
SOAudioKit.Stop MySoundID
SOAudioKit.Invalidate MySoundID
Exit Sub
End If

if SOAudioKit.IsPlaying(MySoundID) Or Pause = 1 Then
' need to wait until it's finished before playing the next sound, check
again in 200 milliseconds
startTimer 100, "PlayFile", FileName
exit sub
end if



-----Original Message-----
From: Stephen Clower [mailto:[email protected]] 
Sent: Wednesday, September 14, 2011 2:34 PM
To: [email protected]
Subject: Re: continuous play with audioKit

Jeff,

Could you post the code you are using to do this?

Steve



On 9/14/2011 3:31 PM, Jeff Weiss wrote:
> I am trying to play one song after another using the audioKit.  I am
> using a timer so that one song won't play until the last song is
> finished.  This works fine.
>
> When I use a for next loop to play 20 songs, for example, the songs
will
> play, but they are not in order.
>
> The songs play one after another, but how can I keep them in order
when
> they play.
>
> Thanks,
>
>
>
> Jeff Weiss, CVRT
>
> Rehabilitation Teacher
>
> Lions World Services for the Blind
>
> 2811 Fair Park Blvd.
>
> Little Rock, AR 72204
>
>
>
> http://www.lwsb.org
>
>
>
> The Mission of LWSB is to educate adults who are blind or visually
> impaired for careers and independent lives.
>
>
>
>

-- 
Stephen Clower
Product support specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

Reply via email to