I don't understand what the
if rnd(100)=1
Endif
is for - it's totally unrelated to the problem.
Or are you saying, "that's the point - it may well be, but it fixes the problem"?
All it's doing is comparing a random number to 1 and if it matches checks to see if the music is playing and if not plays it. If anything, you would think that this would add to any gap before the loop starts again.
Actually, it's the Loop Music command I have problems with - not Play Music.
I've attached a short mp3 which I wrote which is meant to be looped continuously. In WinAmp, it sounds like it should - a continuous loop.
If you convert it to a wav file, it also does the same in Sound Forge.
However if you use:
Load Music "Options.mp3",1
Loop Music 1
in DB, there's a small gap at the end before it starts playing again which completely ruins the effect I was after!
Maybe it's my machine, so let me know if it does the same for you.
By the way, I tried your code (pasted below) and it played the music once and then stopped!
sync on
load music "Options.mp3",1
play music 1
do
if rnd(100)=1
if music playing(1)=0 then play music 1
endif
sync
loop
TDK_Man