loop a sound
BlitzMax Forums/BlitzMax Beginners Area/loop a sound
| ||
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 |
| ||
| See: ChannelPlaying() |
| ||
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
|