0
0

Hello,

I was wondering if when an event is stolen by another using the same sound the new event can be made to start playing from where the last event stopped although coming from a different position.
For example if I have three looping sound sources pointing at the same sound with max playbacks set to 1 and behaviour to "just fail if quietest", when one event steals the other it would continue from where the last event stopped instead of restarting the sound.

Thank you,
Pedro

  • You must to post comments
0
0

If you’re talking about simple events you can make this functionality using event callbacks and the low level API.

Inside the FMOD_EVENT_CALLBACKTYPE_STOLEN case for the callback you get the event’s channel group and then get the channel of the sound which is playing, then use getPosition to store the progress of that channel. Then in the FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED you use that value to setUserData on that event. Then after event->start() you get the channel and setPosition to the userData value. I tested this and it works fine.

  • You must to post comments
0
0

That’s great, we managed a workaround on it but that does seem tidier.

Thanks,
Pedro

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.