The built-in library’s Audio category has fourteen rows. A row shows only where changing it can change something on the player’s machine: a volume whose sounds your project has not named yet stays hidden (the check on save notes it for you as an Info, and a running game says nothing), the device list shows only on Windows, and Output Mode only when the device offers a choice.
Give each kind of sound its volume
| Row | What it changes out of the box |
|---|---|
| Master Volume | Everything the game plays (the output volume of the main submix) |
| Music Volume, Effects Volume, Dialogue Volume | The engine’s Music, SFX and Voice sound classes, and their child classes |
| Ambient Volume, Interface Volume | Nothing yet: hidden until you name their sounds |
| Voice Chat Volume | Other players talking through the engine’s voice chat: the project’s VOIP Sound Class (Project Settings > Audio). Hidden while that is empty, the engine’s default |
| Menu Narration Volume | The voice that reads Rolly menus aloud, in every installed Rolly product (the console variable rolly.). Shown while the voice in use plays through the game’s audio; a screen reader keeps its own volume (see Menu narration) |
| Accessibility Cues Volume | Nothing by itself: your cue code reads the value. Hidden until that code registers (see Apply a volume in your own code) |
To wire up Ambient or Interface, create a collection from the defaults (Tools > Rolly > Create Settings Collection from Defaults…), open the setting and give its binding a target:
- Sound Class Volume: pick the sound class your ambient sounds use; its child classes follow. Theme sounds of the Rolly UI play with the sound’s own class, so give your menu sounds the class Interface Volume names.
- Or replace the binding with Submix Volume (pick the submix those sounds are routed to; its output volume goes from silent to full, never louder) or Control Bus Volume (pick an Audio Modulation Sound Control Bus; see Control buses).
Hidden Until Set, on the volume bindings, keeps a setting hidden without a warning while its target is empty; the built-in library ticks it for Ambient and Interface, and the check on save then notes the missing target as an Info, which a running game does not report. Without it an empty target is a setup warning, because a slider that changes nothing is a defect.
A volume of your own
Add a Slider from 0 to 1 with Step 0.05, Display Multiplier 100 and Display Format {Value} %, as the library’s volumes have, name it “
Control buses
Control Bus Volume sets the bus’s global mix value, from 0 to 1. Rolly Settings calls Audio Modulation’s Set Global Control Bus Mix Value without depending on the plugin, so projects that do not use it never load it. Enable the Audio Modulation plugin (Edit > Plugins); while it is off, the setting is hidden and the setup checks say why. Should a later engine change that function, the setting hides with a setup error; a Custom binding whose Apply Value calls the node does the same job.
Apply a volume in your own code
Accessibility Cues Volume uses the Channel binding: Rolly Settings keeps the value, and your code multiplies its own volume by it. The row shows only while your code is registered as the setting’s user, so a game without cues never shows it. Registering for Menu Narration Volume (Rolly.Settings.Audio.MenuNarration) shows that row too, for narration code of your own that reads the value.
Blueprint
- When your cue player starts: Get RollySettingsSubsystem, then Register Setting User with the Setting Tag
Rolly.Settings.Audio.AccessibilityCuesand User Self. - Read Get Float Value with that tag and multiply your volume by it. Bind On Setting Changed and do it again when the tag matches.
- When it ends: Unregister Setting User. A user that is destroyed stops counting by itself.
A registration counts for the whole game instance, so every local player’s screen shows the row. Is Setting In Use tells whether a setting has a user, and On Settings Availability Changed fires when a setting shows or hides because of what the game has (a user, the audio device).
C++
#include "RollySettingsTags.h"
#include "Subsystems/RollySettingsSubsystem.h"
void UMyCuePlayer::StartCues(URollySettingsSubsystem& Settings)
{
Settings.RegisterSettingUser(RollySettingsTags::Audio_AccessibilityCues, this);
Volume = BaseVolume * Settings.GetFloatValue(RollySettingsTags::Audio_AccessibilityCues);
}Voice chat outside the engine’s mixer
EOS Voice Chat and Vivox (the Voice Chat Interface plugin, IVoiceChat) play outside the engine’s mixer, so neither the VOIP Sound Class nor Master Volume reaches them. In your collection, give Voice Chat Volume the Channel binding, register your voice chat code as its user, and set the output volume yourself, multiplied by Master because that audio skips the main submix:
#include "RollySettingsTags.h"
#include "Subsystems/RollySettingsSubsystem.h"
#include "VoiceChat.h"
void UMyVoiceChat::ApplyVolume(const URollySettingsSubsystem& Settings, IVoiceChatUser& User)
{
const float Talkers = Settings.GetFloatValue(RollySettingsTags::Audio_VoiceChat);
const float Master = Settings.GetFloatValue(RollySettingsTags::Audio_Master);
// 1 leaves the talkers as loud as they arrive; the product never goes above it.
User.SetAudioOutputVolume(Talkers * Master);
}Call it when voice chat starts and on On Setting Changed for either tag. The engine’s own voice chat (Online Subsystem voice) needs none of this: it plays through the VOIP Sound Class, which Voice Chat Volume follows.
Let players pick their speakers or headphones
Output Device (Windows) lists System Default, then the active devices by name; two devices with the same name get “(2)”, “(3)”. The choice is saved by the device’s endpoint id, which survives restarts and replugging, though not a driver reinstall.
- System Default follows the system’s default device, and the setting’s detail names the device that plays now.
- An unplugged device stays in the list as “Name (not connected)” while it is the saved or chosen value, and the game plays through the system’s default until it is back; then the game switches back without input, also when Windows reports only that a device it knows is active again. The entry leaves the list once the player applies another device.
- A device picked from a list that was out of date (unplugged while another one played) is not switched to: the list is read again first. A switch that ends without a device moves the game to the system’s default, so it never stays silent.
- A switch makes a short gap in the sound, so the setting waits for Apply.
- Other platforms follow the system, so the row is hidden there.
In the editor, Play In Editor shares the editor’s audio device unless Editor Preferences > Level Editor > Miscellaneous > Create New Audio Device for Play in Editor is on; until then the setting changes nothing, and its detail says so. A Standalone Game always has its own device.
Mix for the player’s speakers
- Mono Audio plays the same sound from every speaker and both sides of headphones: every full-range channel gets the average of all of them, and the low-frequency channel keeps its own.
- Output Mode offers what the device can do: Auto (the device’s own layout, named: Auto (stereo), Auto (5.1), Auto (7.1)), Stereo (surround folded into the front pair at -3 dB, offered on devices with more than two channels, and kept on a stereo headset while it is the saved choice) and Headphones (every 3D sound spatialized for headphones by the project’s spatialization plugin, offered only while one is active). The row hides when only one of them applies, and it is unavailable while Mono Audio is on, which already mixes every channel together. The system decides how many channels the device has: for surround, the player sets the system’s audio device to 5.1 or 7.1.
- Dynamic Range has Full and Night Mode, a compressor on the main submix (4:1 above -24 dB, with make-up gain) that makes quiet sounds louder and loud sounds quieter for playing at a low volume.
Mono Audio and the stereo fold are one effect of Rolly Settings on the main submix, followed by the engine’s dynamics processor for Night Mode. Both are added to the audio device when the first of them turns on and are only switched after that, so they cost nothing in a game where nobody turns them on.
Decide what the game does in the background
Background Audio sets how loud the game plays while another window has focus: Keep Playing, Lower to N % or Mute. Its default follows the project’s Unfocused Volume Multiplier (Engine.ini, section [Audio]): Mute at 0, Keep Playing at 1, Lower at the project’s level otherwise. The binding’s Lower Volume is the level of Lower (25 % unless the project’s multiplier lies between 0 and 1). The project’s own value comes back when the game ends, so a later start reads the project’s value, not the player’s.
In the editor, the editor’s Allow Background Audio preference sets that volume every frame, so the setting has no effect there and its detail says so; test it in a Standalone Game.
Limits
- Master Volume, Mono Audio, Output Mode and Night Mode work on the main submix: sounds routed to an endpoint submix of their own, voice chat outside the engine’s mixer and the engine’s text-to-speech are not mixed by them.
- Submix volumes and control bus values go from silent to full; nothing plays louder than its own volume.
- Headphones needs a spatialization plugin chosen for the platform (Project Settings > Platforms > Windows > Audio). Without one the option is not offered, and a saved Headphones starts on Auto.
- When the engine refuses a device switch because another one is running, the switch is asked again at the next device change.
- Not yet checked on real hardware: switching devices with a headset plugged in and out, surround output on a 5.1 or 7.1 device, and Background Audio in a packaged game. The automated tests check what the settings hand to the engine.