PlayMusic() Loop flag does not work

Archives Forums/BlitzPlus Bug Reports/PlayMusic() Loop flag does not work

TAS(Posted 2010) [#1]
I have 17+ large background music files that my game plays depending on the Game State. Load Sound takes too long to load and uses too much memory especially considering PauseChannel and ResumeChannel work perefectly otherwise for my needs.

s$=RequestFile("Chose wav or mp3","wav;*.mp3",0)
If s$="" Then End
Print s$
Print "Close console to exit"
n=PlayMusic(s$,1) ;1=Loop music dose not work!!
If n=0 Then End
Repeat:Forever

Last edited 2010


InvincibleWall(Posted 2010) [#2]
I noticed the same thing occur in my game


TAS(Posted 2010) [#3]
Here's a work around.

s$=RequestFile("Chose wav or mp3","wav;*.mp3",0)
If s$="" Then End
Print s$
Print "Close console to exit"

n=PlayMusic(s$) ;1=Loop music dose not work!!
Print n
If n=0 Then End

Repeat
Delay 100
If ChannelPlaying(n)=False
n=PlayMusic(s$) ;note new handle
Print "Play again, handle= " + n
EndIf
Forever