Protecting a sound channel
Blitz3D Forums/Blitz3D Beginners Area/Protecting a sound channel
| ||
I've nearly finished my first game in Blitz :) However i'm having some trouble adding some of the final polish to the game, specifically the background music. I have set the music up to loop and played it, but after a while the music stops, I think because the sound channel is in use by another sound. music=LoadSound("<filename>") LoopSound music PlaySound music Is there a way I can protect the music entity so that it always plays regardless of other sounds please? |
| ||
Assign the sound to a sound channel:music=LoadSound("<filename>") LoopSound music chnBackground=PlaySound (music) Then you can check to see if the channel is still playing If ChannelPlaying(chnBackground) = false then PlaySound music End If |