# Programmer Event works weirdly when recording

**URL:** <https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [January 17, 2024, 4:11pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112 "2024-01-17T16:11:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xanaramus](https://avatars.discourse-cdn.com/v4/letter/x/b19c9b/32.png) [@xanaramus](https://qa.fmod.com/u/xanaramus)\
**Post date:** [January 17, 2024, 4:11pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/1 "2024-01-17T16:11:21Z")

</div>

Unity: 2022.2.18  
FMODIntegration: 2.0.2.19  
FMODStudio: 2.0.2.19  
OS: Windows.10

Steps to reproduce:

1. Using Photon Fusion Voice intergration with FMOD
2. Use programmer event with async + looping region + persistent on.
3. Enable Recorder.DebugEcho
4. Voice will be working for a small period than gone with strange sound
5. Logs doesnt show that sound was destroyed

Can provide example project if needed

With no event FMOD works perfectly, in discord of photon, people said that programmer sound stopped working at some point.

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4fb70404cf3d1c7d55416f96ce1b9f89baa62e67.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/a/ab432e425a60ee0874a4ede2c861f504280526e4.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/d/d61730c138feb3a006999869b3f6e2a5be2359c9.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7405bb75106ae41a60f1331dafad32fdf87d0830.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c142c10dcea62e988937dbb6888097052c30f9b5.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e0ee1dbcb068677eab44b25f0a7f7a88639aaa50.png)

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [January 22, 2024, 3:14am UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/2 "2024-01-22T03:14:59Z")

</div>

Hi,

Can I get you to provide a more detailed series of reproduction steps, specifically around which Photon classes/components you are using? An example project would also work - you can upload it to your [FMOD profile](https://www.fmod.com/profile#uploads), but note that you’ll have to register a project with us to do so.

---

<div class="post-metadata">

**Author:** ![xanaramus](https://avatars.discourse-cdn.com/v4/letter/x/b19c9b/32.png) [@xanaramus](https://qa.fmod.com/u/xanaramus)\
**Post date:** [February 5, 2024, 2:22pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/3 "2024-02-05T14:22:19Z")

</div>

@Leah_FMOD

> **[impostor\_default.zip](https://drive.google.com/file/d/1RHsLwqu7pZAMm-8LiEULs5qp8baTPkJ9/view?usp=sharing)**
>
> Google Drive file.

I uploaded impostor project [Impostor | Photon Engine](https://doc.photonengine.com/fusion/v1/game-samples/fusion-impostor)  
with fmod integration, fmod project.

In this example i even added reverb and voice works for limited time with effect being applied. And at some point voice just dissapears, sometime with strange crackling noise.

To reproduce issue: just enable debug-echo in recorder component during runtime, and you should start hearing yourself.

I also uploaded some screenshots, that should help.

Components:  
FMODAudioIn, FMODAudioOut, SpeakerFMOD, FMODRecorderSetup.

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/ee696c9d401b5ec1620c71dc297904031e5b3994.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/3922e5e30bf6808f6404928f029d5706a3261457.jpeg)

---

<div class="post-metadata">

**Author:** ![xanaramus](https://avatars.discourse-cdn.com/v4/letter/x/b19c9b/32.png) [@xanaramus](https://qa.fmod.com/u/xanaramus)\
**Post date:** [February 10, 2024, 12:05pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/4 "2024-02-10T12:05:19Z")

</div>

Any updates?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [February 11, 2024, 10:57pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/5 "2024-02-11T22:57:39Z")

</div>

Thanks for uploading the example project - I’ll take a look at it and get back to you soon.

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [February 14, 2024, 1:59am UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/6 "2024-02-14T01:59:11Z")

</div>

Thanks again for uploading the project.

I’ve done a little digging, and it seem that everything is working as expected on the FMOD side of things. The issue appears to be with how the Photon output code handles overruns and resynchronizing the mic audio datastream with what is passed to the FMOD Sound with Sound::lock and Sound::unlock - at some point, it looks like Photon can’t resync/recover properly from the overrun.

Beyond that, I’m afraid I can’t really be of much help, as this involves 3rd party integration code and as a result falls outside the scope of support. I hope this points you in the right direction.

---

<div class="post-metadata">

**Author:** ![xanaramus](https://avatars.discourse-cdn.com/v4/letter/x/b19c9b/32.png) [@xanaramus](https://qa.fmod.com/u/xanaramus)\
**Post date:** [March 2, 2024, 2:50pm UTC](https://qa.fmod.com/t/programmer-event-works-weirdly-when-recording/21112/7 "2024-03-02T14:50:48Z")

</div>

It was problem with Photon Voice, they already uploaded the fix, thanks!
