# Programmer Instrument latency with "on event stopped" UE4

**URL:** <https://qa.fmod.com/t/programmer-instrument-latency-with-on-event-stopped-ue4/14822>\
**Category:** Unreal Engine\
**Created:** [July 1, 2019, 11:26am UTC](https://qa.fmod.com/t/programmer-instrument-latency-with-on-event-stopped-ue4/14822 "2019-07-01T11:26:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zsombor.bencsik](https://avatars.discourse-cdn.com/v4/letter/z/ee7513/32.png) [@zsombor.bencsik](https://qa.fmod.com/u/zsombor.bencsik)\
**Post date:** [July 1, 2019, 11:26am UTC](https://qa.fmod.com/t/programmer-instrument-latency-with-on-event-stopped-ue4/14822/1 "2019-07-01T11:26:18Z")

</div>

Hi,  
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!

UE4. 4.20.2  
FMOD 1.10.12

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 8, 2019, 4:52am UTC](https://qa.fmod.com/t/programmer-instrument-latency-with-on-event-stopped-ue4/14822/2 "2019-07-08T04:52:59Z")

</div>

There are two different levels to consider:

- Event

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.

- Instrument/Sound

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.
