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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ticowiko

Pages: [1]
1
Audio / Negative offset for music, especially when looping ?
« on: October 26, 2023, 12:05:10 am »
Is there any way for music offset to be negative ? I'm especially interested in making this happen when looping music, having a small delay between the end of one loop and the start of the next. I've tried just using a negative offset and this is simply ignored, be it for the initial offset or the looping one :

Quote
  float loopDelay = 5.0f;
  music.setPlayingOffset(sf::seconds(-loopDelay));
  music.setLoopPoints(sf::Music::TimeSpan(sf::seconds(-loopDelay), music.getDuration() + sf::seconds(loopDelay)));
  music.play();

I can implement this myself if needed by managing the looping with custom code, but I was curious if this was available out of the box as this doesn't seem too niche of a feature.

Pages: [1]
anything