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 :
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.
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.