# Error FMOD Ambient sound keeps playing when level is hidden

**URL:** https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866
**Category:** Unreal Engine
**Created:** [March 12, 2021, 8:57am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866 "2021-03-12T08:57:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![blackchiligoat](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@blackchiligoat](https://qa.fmod.com/u/blackchiligoat)
#### Post date: [March 12, 2021, 8:57am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/1 "2021-03-12T08:57:33Z")

</div>

Hello everyone,

I have a problem with FMOD ambient sounds after updating to the latest version. I have several FMOD ambient sounds in the level marked as “auto activate”. When I load the level they start playing but when I hide the same level all FMOD ambient sounds keep playing even if the level is not enabled anymore.

Is this a known issue? Is there any workaround to fix the issue temporary?

I am using Unreal Engine 4.26.1 and FMOD 2.01.08.

Thanks

---

<div class="post-metadata">

### Author: ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)
#### Post date: [March 15, 2021, 4:19am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/2 "2021-03-15T04:19:37Z")

</div>

It sounds like you’re not sending a stop command to the affected events when the level is hidden. If that’s the case, this is the expected behavior.

If you are sending a stop command, perhaps it’s not set up correctly? Could you send us a screenshot of the blueprint that stops the event?

---

<div class="post-metadata">

### Author: ![blackchiligoat](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@blackchiligoat](https://qa.fmod.com/u/blackchiligoat)
#### Post date: [March 15, 2021, 10:02am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/3 "2021-03-15T10:02:17Z")

</div>

Hi joseph,

No, i’m not sending a stop command to the FMOD events. But in previous versions this worked fine without sending a stop command.

In my case i have 2 levels, I show the first of them and ambience sounds start playing then I hide the first level and show the second, in this case ambien sounds of the first level should stop play but they still sound.  
Before updating to the latest version this works fine.

thanks.

---

<div class="post-metadata">

### Author: ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)
#### Post date: [March 15, 2021, 11:38pm UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/4 "2021-03-15T23:38:06Z")

</div>

Which versions of UE4 and FMOD Studio were you using before updating?

---

<div class="post-metadata">

### Author: ![blackchiligoat](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@blackchiligoat](https://qa.fmod.com/u/blackchiligoat)
#### Post date: [March 17, 2021, 6:52am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/5 "2021-03-17T06:52:19Z")

</div>

Unreal Engine 4.25+ and FMOD 2.00.13

---

<div class="post-metadata">

### Author: ![pwkmikekelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pwkmikekelly/32/1763_2.png) [@pwkmikekelly](https://qa.fmod.com/u/pwkmikekelly)
#### Post date: [March 19, 2021, 2:07am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/6 "2021-03-19T02:07:21Z")

</div>

I have the same issue. The problem is that UFMODAudioComponent::ReleaseEventInstance is getting called before UFMODAudioComponent::EndPlay, so that when Stop is called from EndPlay, StudioInstance is null, and the sound doesn’t get stopped. ReleaseEventInstance is getting called from UFMODAudioComponent::OnUnregister. I’ve fixed it for now by calling Stop from ReleaseEventInstance.

---

<div class="post-metadata">

### Author: ![blackchiligoat](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@blackchiligoat](https://qa.fmod.com/u/blackchiligoat)
#### Post date: [March 22, 2021, 9:09am UTC](https://qa.fmod.com/t/error-fmod-ambient-sound-keeps-playing-when-level-is-hidden/16866/7 "2021-03-22T09:09:44Z")

</div>

Hi pwkmikekelly,

thank you for your answer, i implemented your solution and it works great!
