Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SetLoop(true) doesn't work  (Read 5228 times)

0 Members and 1 Guest are viewing this topic.

xarxer

  • Newbie
  • *
  • Posts: 35
    • View Profile
SetLoop(true) doesn't work
« 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!  :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SetLoop(true) doesn't work
« Reply #1 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?
Laurent Gomila - SFML developer

xarxer

  • Newbie
  • *
  • Posts: 35
    • View Profile
SetLoop(true) doesn't work
« Reply #2 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SetLoop(true) doesn't work
« Reply #3 on: October 18, 2009, 09:28:35 pm »
Maybe there's a long silence at the end of the music?
Laurent Gomila - SFML developer

xarxer

  • Newbie
  • *
  • Posts: 35
    • View Profile
SetLoop(true) doesn't work
« Reply #4 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..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SetLoop(true) doesn't work
« Reply #5 on: October 19, 2009, 08:17:28 am »
Can you upload it?
Laurent Gomila - SFML developer

 

anything