1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
# sound testing
# play the first two seconds of a sound
wavplay "bounce.mp3"
pause 2
# pause the sound for 1 second
wavpause
print "state = " + wavstate
pause 1
# go back to the beginning and play
wavseek 0
wavplay
print "state = " + wavstate
# show wav status ten times over the next second
for k = 1 to 10
print msec + " " + wavstate() + " " + wavpos() + " " + wavlength()
pause .1
next k
# wait for playback to complete
wavwait
# show final status
print msec + " " + wavstate() + " " + wavpos() + " " + wavlength()
print "done"
|