- Online Community Forums » Programming Questions » Audio wont loop, audio freezes at end of stream (.ogg)

This thread is locked; no one can reply to it. rss feed Print
Audio wont loop, audio freezes at end of stream (.ogg)
Member #12,157
July 2010

I have some audio that is loaded from an .ogg file and played using loop mode. Here is my code that loads the audio and begins looping it:

    backgroundMusic = al_load_audio_stream_f(gameEngine::resources::audio.openSubFile(":mainMenu:BGMusic.ogg", false),".ogg",200,20);

It plays fine, but when it gets to the end of the audio it should loop back to the beginning. Instead it freezes and keeps repeating a small fragment of the audio (eg. a broken record player sound, or the sound you hear when a CD player freezes).

Does anyone know why it won't loop? I've also tried playing with the buffer count and samples on the al_load_audio_stream_f, but that didn't seem to change anything.

Go to: