bDuckingOptOut
bDuckingOptOut
#Overview
name: bDuckingOptOut
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bDuckingOptOut is to control the audio ducking behavior in Unreal Engine’s voice communication system. Audio ducking is a technique where the volume of background audio is automatically lowered when voice communication is active, allowing the voice to be heard more clearly.
This setting variable is primarily used in the Online Subsystem and Voice modules of Unreal Engine. Specifically, it’s referenced in the OnlineSubsystemUtils plugin and the Voice module for Windows.
The value of this variable is typically set in the engine configuration file (GEngineIni) under the [OnlineSubsystem] or [Voice] section. If not explicitly set in the config file, it defaults to false.
The bDuckingOptOut variable interacts with the audio ducking system. When set to true, it opts out of the automatic audio ducking feature.
Developers should be aware that:
- This setting affects the overall audio experience in games with voice chat.
- It’s platform-specific, with the provided code showing implementation for Windows.
- The setting is read during the initialization of voice capture devices and when handling voice commands.
Best practices when using this variable include:
- Consider the target audience and the type of game when deciding whether to opt out of audio ducking.
- Test thoroughly with and without audio ducking to ensure the best audio experience for users.
- Provide in-game options for users to control this setting if voice chat is a crucial part of the game experience.
- Document the chosen setting and its implications for the development team and potentially for users in game settings.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:89, section: [Voice]
- INI Section:
Voice
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/OnlineSubsystemUtils.cpp:381
Scope (from outer to inner):
file
function bool HandleVoiceCommands
Source code excerpt:
}
bool bDuckingOptOut = false;
if (!GConfig->GetBool(TEXT("OnlineSubsystem"), TEXT("bDuckingOptOut"), bDuckingOptOut, GEngineIni))
{
UE_LOG_ONLINE_VOICE(Log, TEXT("Voice ducking not set by config [OnlineSubsystem].bDuckingOptOut"));
}
FString VoiceDump;
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/OnlineSubsystemUtils.cpp:401
Scope (from outer to inner):
file
function bool HandleVoiceCommands
Source code excerpt:
UE_LOG_ONLINE_VOICE(Display, TEXT("Voice Interface Available: %s"), bVoiceInterface ? TEXT("true") : TEXT("false"));
UE_LOG_ONLINE_VOICE(Display, TEXT("Voice Interface Enabled: %s"), bHasVoiceInterfaceEnabled ? TEXT("true") : TEXT("false"));
UE_LOG_ONLINE_VOICE(Display, TEXT("Ducking Opt Out Enabled: %s"), bDuckingOptOut ? TEXT("true") : TEXT("false"));
UE_LOG_ONLINE_VOICE(Display, TEXT("Max Local Talkers: %d"), MaxLocalTalkers);
UE_LOG_ONLINE_VOICE(Display, TEXT("Max Remote Talkers: %d"), MaxRemoteTalkers);
UE_LOG_ONLINE_VOICE(Display, TEXT("Notification Delta: %0.2f"), VoiceNotificationDelta);
UE_LOG_ONLINE_VOICE(Display, TEXT("Voice Requires Push To Talk: %s"), bRequiresPushToTalk ? TEXT("true") : TEXT("false"));
TArray<FString> OutArray;
#Loc: <Workspace>/Engine/Source/Runtime/Online/Voice/Private/Windows/VoiceModuleWindows.cpp:291
Scope (from outer to inner):
file
function bool FVoiceCaptureDeviceWindows::Init
Source code excerpt:
}
bool bDuckingOptOut = false;
if (GConfig)
{
if (!GConfig->GetBool(TEXT("Voice"), TEXT("bDuckingOptOut"), bDuckingOptOut, GEngineIni))
{
bDuckingOptOut = false;
}
}
FAudioDuckingWindows::UpdateAudioDucking(bDuckingOptOut);
bInitialized = true;
return true;
}
void FVoiceCaptureDeviceWindows::Shutdown()