Hey,
I left this alone for a little while but have come back and still trying to figure it out. What exactly do you mean by master sound class?
I have created a Sound Mix (https://we.tl/1KIrKvUo2t) which should set the volume to 0. In BP, if I push this sound mix, it doesn’t do anything to effect the volume.
The only place in the Sound Mix I can see you can change the volume is if you add a Sound Class Effect, where you can change the Volume Adjuster to 0. But I can’t see anything about it affecting a ‘master sound class’.
What am I doing wrong?
There is a global master sound class that exists by default – you don’t need to set it. All sounds automatically play in the master sound class (look at the sound class entries for various USoundBase objects like SoundCues, SoundWaves, etc). It will default “master” in the sound class entry. You can create a sound mix that turns the volume of the master class to 0 by doing what you describe and adding a sound class adjuster for the master class and setting it to 0. If you want to use your own sound class you can do that too, but you have to make sure the sounds you want to set to 0 are using your new sound class.
I’m probably being really annoying here, but this still isn’t working for me.
Here’s what I’m trying:
- I have a UMG video player with two buttons, one which starts/stops the video, one which for purposes of testing simply mutes/unmutes the audio.
- I have created two Sound Mixes, one which sets the volume to 0 (
Volume_0
) and one which sets it to 1 ( Volume_1
).
- At BeginPlay, the
Volume_1
mix is pushed onto the system.
- When the mute button is pushed it either: (1) pops the
Volume_1
mix and pushes the Volume_0
mix to mute, or (2) pops the Volume_0
mix and pushes the Volume_1
mix to unmute.
Based on what you said about these Sound Mixes affecting the master class without needing to do anything, this seems like it should work, right? But it doesn’t do anything – it has no affect whatsoever on the audio.
I’m obviously still missing out a step here, but I’ve been reading over and over this thread and can’t figure out what it is!
Here are the two sound mixes, and the blueprint for the UMG widget:
What am I still doing wrong?
Hey MinusKelvin, any idea how to make this work? Still can’t seem to affect the volume of Media Players…
Just looking at this briefly, it looks like you’re sound mixes aren’t applied to any sound classes. If you want your sound mix to apply to the master sound class, you need to specify the master sound class in the sound mix.
I think you were confused when we said it would work automatically for sounds. New sounds will by default play on the master sound class. What that means is your sound waves, sound-cues, etc, will look like this by default:
I’m not 100% familiar yet with media player, but all it is is a “procedural source” that is a derived class of USoundBase, which is the thing that does this default behavior with sound classes, etc. So it should just work with the sound mix system.
So I finally figured out how to find the Master sound class! I had to go to View Options → Show Engine Content in order to be able to select that in the sound mix.
However, it still isn’t working with the setup I listed above. I suspect it’s because the Media Sound Wave hasn’t been assigned a class? But when I open it up, it doesn’t look like the one you’ve posted (your soundwave.png above), it looks like this:
There’s nowhere to choose the sound class. From what you’re suggesting, they should be affected by the Master soundclass anyway, but that doesn’t seem to be the case, unless my BP setup is wrong in the first place…?
When you drag the media sound wave into the level, it should create a ambient actor. Ambient actor’s will have audio component UI that let you edit/override the sound class for any sound played in the actor.
Ok, so I dragged the Media Sound Wave into the scene to create an AmbientSound. As you said, I was able to set the sound class (though it doesn’t look exactly the same as your example):
But … it still doesn’t work. Bear in mind I am playing the sound/video in UMG, so is the creation of an AmbientSound really the right approach?
Just to explain again, this is the current setup:
- A video file brought in as Media Player
- UMG widget with the Media Player playing as a video (as brush in an image widget)
- Two Sound Mixes, one with volume set to 0, one with volume set to 1. Both are set to affect the Master sound class.
- A button in the UMG which toggles (with combined pop/push operations) between the two sound classes, essentially toggling to mute/unmute the sound.
- A Media Sound Wave created from the Media Player has been added to the scene to create an AmbientSound actor
- The AmbientSound actor has had its sound class set to Master, so that it should be affected by the pop/push of the Sound Mixes (which are set to affect the Master sound class)
And yet, the mute/unmute button does nothing to affect the sound coming out of the Media Player playing in the UMG.
I am happy to send the project if that would help?
Do you have a working example of a setup where you can control the volume of a Media Player video playing in the UMG?
Yes, at this point, I think you’re correct that UMG is the issue. Have you been able to get it to work without using UMG? I’m not quite familiar how media player works in UMG. I followed the documentation here: Media Framework in Unreal Engine | Unreal Engine 5.1 Documentation
Create a media texture and play the media that way. In that case, it does play the audio correctly.
It could be that UMG is not playing audio through the ambient actor but instead doing something else (and not setting up the sound class properly).
For another quick workaround see my posts on the second page of this thread: 4.18 Control volume of Media Sound component? - Audio - Unreal Engine Forums
Even in 2022, this issue hasn’t been resolved.
It’s impossible to control the media player volume.
I made an entire thread trying to control the volume, but nothing works:
I can play music using the media player from the UI and level, but I cannot control the volume no matter what I do.
Dear MeshMyster,
Did you find any solution?
Thanks.
I got a solution to control the MediaSound in 4.26.
We can use “Set Volume Multiplier” in Blueprint. And you should place only one actor which has a MediaSound Component because tracking the component you want to control was complicated for me.
Thanks