Looping OGG Music

BlitzPlus Forums/BlitzPlus Programming/Looping OGG Music

Anyone had any problems with looping OGG music?

lngChannelHandle% = PlayMusic("music.ogg", 1)

The flag of 1 indicates the music should loop, right? Well no matter what I try, I can't get this to work - The music plays through once and that's it!

I had a quick look through the forums, but couldn't find a mention of this anywhere, so am I missing something?

TIA

Use LoopSound instead.

One thing, is an OGG file, when played as music, streamed from the disk? And if so, if it were loaded as a sound instead, would it instead be loaded up entirely into RAM? Never been quite sure how Blitz handles that.

All I do know is that if you want seamless looping of a piece of audio, it has to be used as a sound, not as music...

There is no 'looping' parameter with PlayMusic(). [EDIT]Turns out there is in BlitzPlus - doesn't work here either though[/EDIT]

You have to check to see if the channel is still playing, and if not, restart it manually, thus:
Handle = PlayMusic("music.ogg")

While Not Keydown(1)
  If Not ChannelPlaying(Handle)
    Handle = PlayMusic("music.ogg")
  EndIf
Wend


What GFK said... and yes, it streams it which is why the music starts virtually instantly rather than when you loadsound it has to load it all before playing.

Thanks gents.