on 1/3/06 8:44 PM, Cory at [EMAIL PROTECTED] wrote:
>
> Dim LastBeat as double
> LastBeat=Microseconds
> while window1.playon = true
> if Microseconds - LastBeat >= 150000 then
> HighHat.play
> window1.LastBeat = Microseconds
> end if
> wend
It probably won't make much of a difference, but it is a little cleaner if
you are not having to do a calculation every time you iterate the loop:
Dim NextBeat As Integer = Microseconds + 150000
While Window1.playon
If Microseconds >= NextBeat
HighHat.Play
NextBeat = Microseconds + 150000
End If
Wend
In your code, you have "window1.LastBeat = Microseconds", rather that simply
"LastBeat = Microseconds". Is that by intent? Does this method reside in
Window1, or are you setting a like-named variable somewhere else in the
program. Might that be the source of your problem?
HTH
P.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>