SFML community forums

Help => Audio => Topic started by: Simonciott on October 20, 2022, 07:05:12 pm

Title: Music cuts off at the start of loop
Post by: Simonciott on October 20, 2022, 07:05:12 pm
Hi, I'm new on the forums. I'm having problems with the sf::Music::setLoopPoints() function.
At the start of the loop the audio gets cut off for around half a second and then continues normally.
I don't know if it's a problem with my computer (considering that it's really slow), or if I'm doing something wrong.

Code:
music.setLoop(true); //I'm not sure if this is necessary
music.setLoopPoints(sf::Music::TimeSpan(sf::seconds(13.882, music.getDuration()))); //To anyone who wonders, 13.882 is the precise time I want the loop to start at
 

Thank you to anyone who can give an answer :)
Title: Re: Music cuts off at the start of loop
Post by: eXpl0it3r on October 20, 2022, 09:19:14 pm
In general there shouldn't be a pause/cut-off, but hard to say where exactly the issue might be with the little information provided.

Can you give the 2.6.x branch a try and see if the problem still exists? We've fixed a few audio related things, include some loop point issues.