# Programmer Instruments callback

**URL:** <https://qa.fmod.com/t/programmer-instruments-callback/15221>\
**Category:** Unity\
**Created:** [November 17, 2019, 11:16am UTC](https://qa.fmod.com/t/programmer-instruments-callback/15221 "2019-11-17T11:16:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![firepunchd](https://avatars.discourse-cdn.com/v4/letter/f/65b543/32.png) [@firepunchd](https://qa.fmod.com/u/firepunchd)\
**Post date:** [November 17, 2019, 11:16am UTC](https://qa.fmod.com/t/programmer-instruments-callback/15221/1 "2019-11-17T11:16:41Z")

</div>

Hey

I am using the FMOD example to get callbacks for programmer sounds.

[https://www.fmod.com/resources/documentation-api?version=1.10&page=content/generated/engine\_new\_unity/script\_example\_programmersounds.html](https://www.fmod.com/resources/documentation-api?version=1.10&page=content/generated/engine_new_unity/script_example_programmersounds.html)

I need to know when a sound is done playing.  
I can log the events fine in the static callback function but I am lost on how to determine the status from the script scope where I called Playsound.

Help appreciated,  
Simon

---

<div class="post-metadata">

**Author:** ![firepunchd](https://avatars.discourse-cdn.com/v4/letter/f/65b543/32.png) [@firepunchd](https://qa.fmod.com/u/firepunchd)\
**Post date:** [November 18, 2019, 10:50am UTC](https://qa.fmod.com/t/programmer-instruments-callback/15221/2 "2019-11-18T10:50:40Z")

</div>

My workaround is checking the volume of the instance in the update.

---

<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:** [November 22, 2019, 2:56am UTC](https://qa.fmod.com/t/programmer-instruments-callback/15221/3 "2019-11-22T02:56:03Z")

</div>

You can check the [`Studio::EventInstance::getPlaybackState`](https://www.fmod.com/resources/documentation-api?version=1.10&page=content/generated/FMOD_Studio_EventInstance_GetPlaybackState.html) to determine when the Event stops playing.
