Sound Volume Settings

I’m working on the “Settings” screen of a menu for one of my projects, so a lot of the research I’ve been doing lately pertains to global settings. One of the trickiest in my opinion is sound: just how does UDK handle sound groups?

You’ve all seen it before, in pretty much every game options screen. There are three sliders, one of them labeled SFX, another Music, another Dialog, or something to that effect. Gamers these days expect these audio options because everyone plays differently. Some like to crank up the music, others like to mute the annoying announcer, yet others don’t really like explosions and prefer to tone down the ambient sound. UDK keeps to this doctrine by placing sounds into distinct groups: SFX, Music, Ambient, Announcer, Dialog, and so on. Mess with the settings of one of these groups, and you mess with the settings of all the sound cues in that group.

So how do you do it? Like this:

ConsoleCommand("SetAudioGroupVolume [Group] [Multiplier]");

The [Group] can be any one of UDK’s sound groups (I listed some above). The [Multiplier] is the value that the sound is scaled by; 1 is normal, 10 is ten times as loud, 0.1 is barely audible. So for example, to really turn up that music you’d do:

ConsoleCommand("SetAudioGroupVolume Music 10");

The cool thing about this? It appears to be persistent across map changes. I’m not exactly sure how the values get saved (since the function is native and the config files have nothing on it), only that they do.

Still yet, it wouldn’t hurt to initialize the values based on your saved user settings at the start of every match by sticking a bunch of these console commands in PreBeginPlay() of your game class. That way, you can be sure your players hear your game they way they want it to be heard.


One thought on “Sound Volume Settings

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s