loop a sound

BlitzMax Forums/BlitzMax Beginners Area/loop a sound

hub(Posted 2005) [#1]
How to loop music into my game ? I've used this code, but i don't know how to replay the song when it finished !

Local play:TChannel
play = CueSound ("mysong.ogg")
ResumeChannel play

Repeat
...
Until my game finished


Thanks


EOF(Posted 2005) [#2]
See:

ChannelPlaying()


JazzieB(Posted 2005) [#3]
Load it first with LoadSound("mysong.ogg",True). The True says whether the sound should be looped or not.

Global music:TSound=LoadSound("mysong.ogg",True)
Global musicChannel:TChannel=CueSound(music)
ResumeChannel musicChannel