I’m having some trouble with programmer instrument callbacks. I’m playing narration with different lengths and trying to use the “on event stopped” ue4 event but there is a significant latency between when the audio actually goes silent and the on event stopped getting triggered. I know this might be complicated since the event itself has a fixed length. Thanks for help in advance!
There are two different levels to consider:
An Event can be made up of multiple Instruments/Sounds, an Event won’t end naturally until all the contained Instruments/Sounds have finished playing. OnEventStoppd is only broadcast once the Event’s Playback state is
FMOD_STUDIO_PLAYBACK_STOPPED, this is polled every tick which introduce a small amount of delay.
Instruments/Sounds are individual sounds used to make up Events. The FMODAudioComponent uses the Instrument level callbacks to create and destroy Sounds made to play through Programmer Instruments.
The first thing to check is that the Event doesn’t have any Instruments that are stopping it from ending when expected. You can also connect the Studio Profiler and see lifetimes on Events.