soundIsPlaying = sound%
This function returns
_zTrue if a sound is currently playing, or
_false otherwise. This applies to sounds that you play using the
sound <frequency> statement or the
sound <snd> statement, but does not apply to Text-to-speech sounds.
sound% function is useful for determining when an asynchronous sound has finished playing.
startTime& = fn TickCount
endTime& = fn TickCount
print "That sound lasted"; endTime& - startTime&; "ticks."
To determine whether a Text-to-speech sound is currently playing, use the Toolbox function fn SPEECHBUSY.
sound <frequency>; sound <snd>; sound end