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

Author Topic: Music cuts off at the start of loop  (Read 1117 times)

0 Members and 1 Guest are viewing this topic.

Simonciott

  • Newbie
  • *
  • Posts: 1
    • View Profile
Music cuts off at the start of loop
« 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 :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: Music cuts off at the start of loop
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything