MediaSound volume control not fully working for MP4's

Hello All,

I’m having an issue with my MediaSound volume control that is driving me nutz. I’ve created a simple slider to control the audio volume of my MP4 videos playing in MediaPlayer.

It works…but…I can’t, for the life of me, get the audio to go completely quiet. When the slider goes to zero, there is a noticeable drop in volume but the sound is still very clearly audible.
I created a sound class and a mixer for the audio, and added a Set Base Sound Mix node to my widget’s construct and then added a Sound Mix Class Override to the On Value Changed slider.

The result is working because I hear the volume drop and there’s a slight delay (as per the mixer) but the volume doesn’t go to zero like it should. Can anyone offer any insight? Also, if it matters, I’m doing all this in VR using an Oculus Rift-S.

Anyway, here’s some shots of how I have this set up if that helps:

I’ve tried this with a couple of different video files and even found a way to extract the audio component from the MediaSound as a child to try to use a Set Volume Multiplier on just that component, but nothing seems to work. I really hope I’m just forgetting something simple.

I should also mention that I’m using 4.25.3


What is the gain structure? Is the mix value an add/remove dB, rather than a straight linear multiplication?

Thanks, jwatte, I don’t know how I missed your reply earlier. Again, thanks for taking a moment to help me and apologies if this sounds super n00b.

Anyway, I also must apologize for my lack of knowledge about audio – but how do I check the mix value? Unfortunately My mixer has no editable attributes and I don’t see anything in my Sound Class at all that makes reference to dB’s.

I was assuming that the SetSoundMixClassOverride node knows how to reduce the volume based on the value coming from the position of the slider. Zero = no volume, 1 = full volume.

So it looks like I got this figured out now. Not sure if it’s right, but it works for me. It was a combination of things, for anyone else who might run into it…

I’m still not quite sure what jwatte was referring to when (s)he mentioned “gain structure” and add/remove db vs. linear multiplication, but I did find one reference to “linear” and dB’s in the Attenuation Distance of the Sound Component details, which led me to experiment with the different settings. I found that all of them changed how my volume slider worked, with none providing absolute quiet when the slider was at zero. But this one got me the closest:

As mentioned, this got me most of the way, but the video sound was still very audible with the slider all the way to zero. My script looked like this:

After much hair pulling and some profanity, on a whim, I added a volume multiplier in addition to the sound mix override. I had unsuccessfully experimented with it before (in place of the sound mix override) after watching some tuts that had demonstrated using it as an alternative to using the sound mix override. Other tuts I watched demonstrated that the sound mix override was enough to handle the volume control. However, in fairness, none of the tuts I watched was working with audio components from a VIDEO source. Now my working script looks like this:

So in the end I added the volume multiplier, targeted it to my media sound component and now it works like a champ!!

Like I already said, I’m not sure if this is absolutely the best way or even the right way, but it works when nothing else did. Hopefully this helps someone save a little time!