Audio issues [FMOD][Mac]

Hi there :wink:

I’m having two questions:

First one is regarding looping audio. Suppose my melody is 10sec length and I’d like to make it all play the first time and then, starting the second time, looping from 5 to 10sec.
Is there a way to do that ?
To bypass this I had to split the melody into two parts and then check when the first part was played, stop it and then loop the second one… It’s working but there must be something easier…

Well, the 2nd question is linked to the first one:
When I’m stopping the first melody, I’m having this error:

:audio(error): _channel->stop(): An invalid object handle was used. 

It’s not crashing the engine but my curiosity wanted to know why am I having this one and how to avoid it…

Thanks in advance.

Found the answer for -2- which is :
When a music is played completly, it’s state swith automaticly to “stop”. Trying to stop it a second time generate that error.

Apparently, there is no way to perform that loop.
Must I split all my musics instead ?

You could do it with something like Sequence(SoundInterval(myMusic), Func(loopMySound)), where loopMySound() is the function that starts your sound looping from 5 to 10sec.

But splitting the audio sounds like a more straightforward, robust solution.