You have to poll for soundplaying.
The _SNDPLAYING function returns whether a sound is being played. Uses a handle from the _SNDOPEN or _SNDCOPY functions.
Syntax:
playing% = _SNDPLAYING (handle&)
Description:
Returns 0 if a sound is not playing or -1 if it is.
If a sound is paused, _SNDPLAYING will return 0.
'-----------------------------------------------------code for sound
volume = 1 ' full volume
gamestart = False ' no game yet
intromusic = _SNDOPEN("munchies.mid", "VOL") ' open intro music
_SNDVOL intromusic, volume ' set music volume
_SNDLOOP intromusic '
PRINT "This is my Music"
OK, This works too, my error was not includeing the _soundloop , that is why it was only playing once, the other thing, the high_hat.mid has a real long space of silence, in the middle, one may think it is not going to continue, but it dose. I did not write the 3 I just posted.
I tried the munchies.mid with UnseensGDK, "Garrysgame"(catch the bunny)
It worked, but I did not have the _sndloop in it so it did not keep playing continuesly.
So if you compose a loop and have a place inside that loop that checks if sound is playing then if the sound stops soundplaying returns a zero so based off that zero you branch to load and play the sound again. This makes sense, and explains why I could not put the sound inside the main loop. It is hard when I am so tired, well I will "dream" on this,
I think I understand better.
Thanks and see you later
from Garry