I just quickly tried this bit of code.
sync on
sync rate 0
load sound "rain.wav",1
`play sound 1
do
if sound playing(1)=0
play sound 1
endif
sync
loop
It loops continuously. No error checking but I'm just lazy lol. You will still need to put in a condition to stop it of course.
You can see when it works if you use this instead. The screen will change colour every time it loops.
sync on
sync rate 0
load sound "rain.wav",1
play sound 1
do
if sound playing(1)=0
cls rnd(255)
play sound 1
endif
if sound playing(1)=1
set cursor 0,0
print "Playing "
endif
sync
loop
http://s6.bitefight.org/c.php?uid=103081