SFML community forums

Help => Audio => Topic started by: xarxer on October 18, 2009, 07:04:03 pm

Title: SetLoop(true) doesn't work
Post by: xarxer on October 18, 2009, 07:04:03 pm
Hi guys and gals, this is my first post so bare with me..

It seems as if SetLoop(true) doesn't make sf::Music to loop, here's an example:

Code: [Select]

int main()
{
sf::Music Music;
Music.OpenFromFile("music\\hum.ogg");
Music.SetLoop(true);
Music.Play();

while(1)
{
sf::Sleep(1.0f);
}

return 0;
}


The music plays once, and everything goes quiet and the loop continues forever..

I'm running Windows XP, using Visual Studio 2008 and am using SFML1.5.

Thanks!  :)
Title: SetLoop(true) doesn't work
Post by: Laurent on October 18, 2009, 07:21:02 pm
Can you upload the hum.ogg file? Did you test the audio sample from the SFML SDK?
Title: SetLoop(true) doesn't work
Post by: xarxer on October 18, 2009, 09:18:12 pm
Interestingly, it works with another .ogg file!  :)

What could it be with hum.ogg that causes it to be unloopable?
Title: SetLoop(true) doesn't work
Post by: Laurent on October 18, 2009, 09:28:35 pm
Maybe there's a long silence at the end of the music?
Title: SetLoop(true) doesn't work
Post by: xarxer on October 18, 2009, 09:47:13 pm
Nope there isn't.. I've played it in several mediaplayers and it's just a couple of seconds long, and no silence in the end..
Title: SetLoop(true) doesn't work
Post by: Laurent on October 19, 2009, 08:17:28 am
Can you upload it?