# FMOD Event callbacks not firing when Bus has 0 volume

**URL:** <https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414>\
**Category:** Unreal Engine\
**Created:** [December 16, 2024, 11:57am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414 "2024-12-16T11:57:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [December 16, 2024, 11:57am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/1 "2024-12-16T11:57:09Z")

</div>

Hello, i encountered a bug when trying this here:

> [@Mute FMOD sounds when UE4 is out of focus (alt+tab)](https://qa.fmod.com/t/mute-fmod-sounds-when-ue4-is-out-of-focus-alt-tab/18487):
>
> Hi there, I am having problems to mute all the FMOD sounds when the game is not on focus (when I press alt+tab). I know there is an Engine variable called “UnfocusedVolumeMultiplier” that I should put to 0.0, but this one does not work with FMOD sounds, can some one help me please? Thank you very much and I hope you have a nice day.

When my buses are set to 0 volume no single callback is fired for event instances.

For debugging i did this:

```auto
		MusicEventInstance.Instance->setCallback(MusicFinished, FMOD_STUDIO_EVENT_CALLBACK_ALL);

```

But i usually do this to track wether a song on my game stopped playing

```auto
MusicEventInstance.Instance->setCallback(MusicFinished, FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND | FMOD_STUDIO_EVENT_CALLBACK_DESTROYED);

```

Best regards

Ps. The EventInstance remains valid and also remains in state “FMOD\_STUDIO\_PLAYBACK\_PLAYING” even though the event is clearly finished playing.

Perhaps it is interesting to note this is a Programmer Instrument

---

<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:** [December 20, 2024, 3:24am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/2 "2024-12-20T03:24:16Z")

</div>

`FMOD_STUDIO_EVENT_CALLBACK_DESTROYED` is only called when the actual Event Instance is destroyed, otherwise `FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED` will tell you when the programmer sound stops.

I’m not able to reproduce this myself, it appears to be behaving as expected.  
What versions of FMOD and Unreal are you using?

---

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [December 20, 2024, 8:47am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/3 "2024-12-20T08:47:49Z")

</div>

Hi cameron,  
I am encountering no single callback being called. I assume that using the flag

```auto
FMOD_STUDIO_EVENT_CALLBACK_ALL

```

to register to callbacks allows me to listen to all of them. But none of them is called for me.

I am using UE 5.5 and FMOD 2.03.05 EA

Also, when the callback should fire, I am tabbed out of the game to see wether the whole “muting while the game is not in focus” works (which it does).

If it helps I can give access to the Unreal Engine project on github so you can view the source code.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 27, 2024, 2:06am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/5 "2024-12-27T02:06:15Z")

</div>

Hi,

Apologies for the delayed response.

Access to the project would be amazing! Could you please add `Connor-FMOD`. Thank you

---

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [December 27, 2024, 9:32am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/6 "2024-12-27T09:32:59Z")

</div>

@Connor_FMOD Hi no problem, had family at my house over christmas so had no time anyways.

I invited you to my repo “Tufu”. You just have to put the latest FMOD plugin into the “Plugins” folder and it should work.

When you are in editor simply start the game. When the game is focused and a song is finished playing you will see inside the log that the music stopped. If the game is not in focus you will see no callback is happening

You will find everything inside the class Sound/TUFUSound.

- MuteOnWindowFocusLost() is called when unreal engine gains/looses focus. I currently have a workaround which somehow doesn’t work correctly yet, where i track start time of a song and check after the game gains focus wether the length of the song has passed already.
- PlayTUFUTraxSong() starts a song and binds the callback to the EventInstance

Thank you very much for taking a look at it.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 31, 2024, 1:36am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/7 "2024-12-31T01:36:18Z")

</div>

Thank you for access to the project. It looks super cool!

So I did a simple test by setting a bunch of the buses to volume 0 at the start of the main menu map:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/f/f7351e05a66e05321c7f625253920010bf7fcce4.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/1e4712c078ad3fa8f91c97376e2e6a875eb76c54.png)  
It seems that I am still getting the create sound callback. This is making me think that it may not be related to the volume rather how UE is handling putting the project in the background.

Is the desired behavior for music to continue playing silently in the background or to pause?

Would it be possible to run a profiler session when back grounding the project and upload the session to your profile with the following settings

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

An option may be calling `System::mixerSuspend` when entering the background to maintain the positions of all events: [FMOD Engine | Core API Reference - System::mixerSuspend](https://fmod.com/docs/2.02/api/core-api-system.html#system_mixersuspend).

Thanks again!

---

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [January 4, 2025, 12:24pm UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/8 "2025-01-04T12:24:56Z")

</div>

Sorry, was sick in bed and then had a lot of stuff to do.

The intention is the music continues playing in background and when a song is over it starts the next song. I will run a profiler session now.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 6, 2025, 11:14pm UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/9 "2025-01-06T23:14:45Z")

</div>

No worries! I hope you are feeling better. Thank you for the information. I will have another look at the behavior. The profiler session would be great!

---

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [January 14, 2025, 9:33am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/10 "2025-01-14T09:33:51Z")

</div>

Here is a video of the recorded session.

[![](https://img.youtube.com/vi/5MDrMTGz1ak/hqdefault.jpg "fmodcallbacksvid") ](https://www.youtube.com/watch?v=5MDrMTGz1ak)

In my project look into:

Game/Stage0StateManager.cpp

Inside the Update() function is a state machine, per state the phone calls you can hear in the video are played back. For a state to progress I track that 8 seconds have passed and the audio is finished playing (CareerSpeech-\>Stage0IsSpeechDone()).

In this function I simply check wether the UFModAudioComponent for the phone calls exists and if its playing. But after tabbing out the FMOD Audio components is still in the playing state, thus the game logic hangs infinitely.

I am currently uploading the profiler session (its a whopping 800mb in size). Sorry for the massive delay, the profiler didn’t connect to Unreal until i noticed that I have to enable “Live Update” in the Unreal Engine project settings.

Yeah the same problem is with any Event when tabbed out.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 21, 2025, 12:40am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/11 "2025-01-21T00:40:26Z")

</div>

Thank you for the FMOD project and the information.

I have confirmed in your project that callbacks do not seem to be triggering. However, I cannot reproduce the behavior in a test scene.

Are you able to reproduce the issue outside of the current project??

In the `FMODAudioComponent.cpp BeginPlay()` function I have muted the master bus

```auto
void UFMODAudioComponent::BeginPlay()
{
    UE_LOG(LogTemp, Warning, TEXT("Muting master bus"));
    FMOD::System* coreSystem = nullptr;
    IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime)->getCoreSystem(&coreSystem);

    FMOD::ChannelGroup* mCG = nullptr;
    coreSystem->getMasterChannelGroup(&mCG);

    mCG->setVolume(0);
    UE_LOG(LogTemp, Warning, TEXT("Muted"));

```

And then I am triggering a programmer sound with a 1 second delay in a blueprint

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c9385ed685803d81b55b6b90f009f3c9c7d87ab2.png)  
and the prog instrument was still being triggered while muted and tabbed out.

I can confirm that there is strange behavior happening in your project but I cannot confirm if it is coming from the integration.

The project is still looking amazing, keep up the good work!!

---

<div class="post-metadata">

**Author:** ![apfelbaum](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/apfelbaum/32/4843_2.png) [@apfelbaum](https://qa.fmod.com/u/apfelbaum)\
**Post date:** [January 23, 2025, 9:50am UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/12 "2025-01-23T09:50:14Z")

</div>

Thank you very much. You are right.  
I created a new Unreal Engine c++ project and tried to do the same thing as in my main project. I also created a new FMOD project for that.

Here the component correctly stops when you are tabbed out of the game.  
What could cause this issue? An Unreal Engine project setting perhaps or a setting in FMOD Studio?

I am uploading the test project to my profile in case thats useful.

Best regards.

P.S. I deleted the UE Project settings and only changed the minimum (GameMode, GameInstance etc.). The callbacks still don’t work, but I have a different assumption. I will fiddle around more.

P.S. #2 My oh my 😃 I changed the event now in fmod.

- Previously it was a programmer sound in an action sheet
- Now it is a programmer sound (set to async) in a timeline. That fixes it.  
So either it refreshed something in the project that didn’t refresh before, or do programmer sounds (not set to async) in an action sheet never stop?

Best regards.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 28, 2025, 11:58pm UTC](https://qa.fmod.com/t/fmod-event-callbacks-not-firing-when-bus-has-0-volume/22414/13 "2025-01-28T23:58:05Z")

</div>

Thank you for sharing the solution!

> [@apfelbaum](#):
>
> do programmer sounds (not set to async) in an action sheet never stop?

All instruments on in an action event are async: [FMOD Studio | Working with Instruments - Synchronous and Asynchronous Instruments](https://fmod.com/docs/2.02/studio/working-with-instruments.html#synchronous-and-asynchronous-instruments:~:text=Only%20instruments%20on%20timeline%20parameter%20sheets%20can%20be%20synchronous.%20Instruments%20on%20other%20parameter%20sheets%20and%20action%20sheets%20are%20always%20asynchronous).  
Programmer instruments should stop even if they are in action sheets:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c4270674400d7e05fadc24c4e1acdb6e83cb5225.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/a/a87fa1d2cda52f5bfd38f040734bb5c32c9898d4.png)  
I suggest making sure the programmer sound is set up as the following: [Loop region and programmer sounds - #2 by Connor\_FMOD](https://qa.fmod.com/t/loop-region-and-programmer-sounds/20776/2)  
Hopefully, it will avoid other unexpected behaviour.

Please let me know if there is anything else we can do to assist!
