0
0

I have a last thing to solve, I start playing a sound from the beginning, and I want it to start looping the last second of the soundfile, so if the sound is 5 seconds long, it will start playing from the beginning to 4 seconds and the last second it will loop forever.
How do I check the file during runtime if it has reached a specified point in the sound so it will "activate" loop from that point?

I can get it to loop from a specified point in the file but I want to play from the beginning and then start looping, is there any specific parameter och function I can call to do this?, or do I need to check the file every frame if it has passed that point and then activate loop, feels like a big overhead if the FMOD::Update could do this for me. Instead of me looping all active sounds every frame.

Thanks for any help, the game has deadline in 72 hours, this feature is not required but I would like to have in to the presentation. so any help so I could solve it would be very much appreciated.

  • You must to post comments
0
0

To set loop points use setLoopPoints(….). Use setLoopCount(..) for number of time you want to loop. Then to turn on loop use setMode(…). You can do this at the start of your audio and FMOD does the rest!

  • You must to post comments
0
0

setting loop points and calling play will have the sound play from the start anyway. It doesnt just start from loopstart. It always plays from the start of the sound first, then starts looping around inside the specified points.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.