(METASOUNDS) Sound attenuation not working when starting from outside the attenuation radius

Hi!

I’m finding quite difficult to get working the audio attenuation in UE5. I have an audio component using a looping metasound asset, and as the title suggests, when the player starts from outside the audio source radius nothing happens (even when the player enters the audio region). On the ohter hand, if the player starts playing INSIDE the radius, then the attenuation works as expected.

Do you guys know why this happens? Is there any option in the audio component I’m missing?

Thank you in advance!

1 Like

Allright, so playing around with the settings it turns out that the problem seems to be related to METASOUNDS. If you use a looping CUE asset instead of a looping METASOUNDS in the sound component, then the sound attenuation works as expected.

Hey bud did you ever get this working? I am having the same issues as you, only its across the board with all sound types. It just doesn’t work with attenuation turned on. Can’t seem to find a solution anywhere.

EDIT: Found a solution to my issue here, maybe it will help you…

The only way I have gotten sounds to work when from outside to inside of the attenuation radius is to go into the metasound source, click the cog at the top to edit the source specific settings, and under voice management set the virtualization mode to ‘play when silent’.

8 Likes

Thanks for this, it actually just helped me when I got back into MetaSounds from the sound cue I had fixed. Appreciate it!

1 Like

This is definitely a way, for triggers to work in MS though, MS should be active, and even if set “play when silent” triggers do not work because the MS is not active if one is out of the attenuation zone. You are better off using some kind of logic, like a boolean to make effective parameter changes, than triggers

I tried that. And it’s definitely not an efficient way because a restarted MS won’t hold any variable value. It just resets. So in that case we have to pass the boolean parameter at every frame as we don’t know the exact moment we enter the attenuation zone.
I will stick to the “play when silent” mode as it saves a lot of energy.

2 Likes

Sorry to beat zombie, but did not find other topic that is like same. Even 5.1 has issue, starting inside of radius then it works, but going outside bound and entering back then sound is gone. What is best fix for thin now? or just wait and hope 5.2 is fixed that for good…if is fixable at all? or it is own cause and i have missed some option?

Try removing the One-Shot interface from the MetaSound, removing the interface means the MetaSound will keep playing until it’s owning Audio Component is stopped/virtualized. Presumably this is more optimised than PlayWhenSilent.

2 Likes

This worked for me. Thank you!

Thanks for the clutch!

Just wanted to add to this. I found this post because I was having this issue not with Metasounds, but with a regular Sound Cue. I tried setting the virtualization mode to Play when silent, but it still didn’t work. If you’ve also tried this approach and it hasn’t worked, consider trying again with a Metasound instead of a Sound Cue.

This fixed it for me. I was able to start playing the sound even if the player was out of the attenuation radius. Upon entering the attenuation radius, the sound would then become audible.

Just found this thread after having the same issue - am not new to Unreal and Audio, but I am new to Unreal Audio!

Would turning off the One Shot option not mean the sound effectively plays forever?

I am effectively using it to call a one shot sound, but its a long sound, and the player can be out of range when it triggers, then move into it within its duration. Is it safe to use this workaround, or could I be left with loads of instances of the sound permanently hanging around?

1 Like

This is the correct answer - thanks.

In case anyone else stumbles upon this, I discovered that the attenuation radius is based on the location of the player’s camera NOT the character mesh or collision. This applies to both sound cues and metasounds

Your audio assets should have some offset so it aligns with where the camera will be when the player approaches the object emitting the sound. If you are working on a top-down project for example, then you may have to move the sound cue or metasound asset up on the z-axis.

In the screenshot, notice where my player is in relation to the torch (bottom left), and the player camera and metasound (in the top right).