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.
- pcorvo asked 9 years ago
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.
- Guest answered 9 years ago
Please login first to submit.