au.submix.audibledefaultendpoints
au.submix.audibledefaultendpoints
#Overview
name: au.submix.audibledefaultendpoints
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows audio sent to defaulted (typically silent) endpoint submixes to be audible via master. (useful for debugging)\n0: Disabled (Default), 1: Enabled
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.submix.audibledefaultendpoints is to enable audio playback for default (typically silent) endpoint submixes through the master output. This setting is primarily used for debugging purposes in the Unreal Engine audio system.
This setting variable is utilized by the Audio Mixer subsystem of Unreal Engine, specifically within the AudioMixer module. It’s primarily referenced in the AudioMixerDevice.cpp file, which is a core component of the audio processing pipeline.
The value of this variable is set through the Unreal Engine Console Variable (CVar) system. It’s defined as an FAutoConsoleVariableRef, which allows it to be changed at runtime through console commands or configuration files.
The au.submix.audibledefaultendpoints variable interacts directly with the EnableAudibleDefaultEndpointSubmixesCVar. They share the same value, with the CVar system providing an interface to modify this shared value.
Developers should be aware that this variable is intended for debugging purposes. Enabling it (by setting it to 1) will cause typically silent submixes to become audible, which may not be desirable in a production environment.
Best practices when using this variable include:
- Only enable it when debugging audio issues related to default endpoint submixes.
- Remember to disable it (set to 0) after debugging to ensure normal audio behavior in the game.
- Use it in conjunction with other audio debugging tools to isolate and identify issues in the audio pipeline.
Regarding the associated variable EnableAudibleDefaultEndpointSubmixesCVar:
The purpose of EnableAudibleDefaultEndpointSubmixesCVar is to serve as the actual storage for the au.submix.audibledefaultendpoints setting. It’s an integer variable that directly controls the behavior of making default endpoint submixes audible.
This variable is used within the FMixerDevice::OnProcessAudioStream function, which is part of the core audio processing loop. When EnableAudibleDefaultEndpointSubmixesCVar is non-zero, it triggers the processing of audio for default endpoint submixes that would otherwise be silent.
The value of EnableAudibleDefaultEndpointSubmixesCVar is set through the CVar system, specifically by the au.submix.audibledefaultendpoints console command.
Developers should be aware that changes to EnableAudibleDefaultEndpointSubmixesCVar will immediately affect audio processing. It’s important to use this variable cautiously, as it can significantly change the audio output of the game.
Best practices for EnableAudibleDefaultEndpointSubmixesCVar include:
- Avoid modifying this variable directly in code; instead, use the au.submix.audibledefaultendpoints console command.
- When debugging, consider adding logging or breakpoints around the usage of this variable to track when and how it affects audio processing.
- In production builds, ensure this variable is set to 0 to maintain expected audio behavior.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:69
Scope: file
Source code excerpt:
static int32 EnableAudibleDefaultEndpointSubmixesCVar = 0;
FAutoConsoleVariableRef CVarEnableAudibleDefaultEndpointSubmixes(
TEXT("au.submix.audibledefaultendpoints"),
EnableAudibleDefaultEndpointSubmixesCVar,
TEXT("Allows audio sent to defaulted (typically silent) endpoint submixes to be audible via master. (useful for debugging)\n")
TEXT("0: Disabled (Default), 1: Enabled"),
ECVF_Default);
static int32 DebugGeneratorEnableCVar = 0;
#Associated Variable and Callsites
This variable is associated with another variable named EnableAudibleDefaultEndpointSubmixesCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:67
Scope: file
Source code excerpt:
ECVF_Default);
static int32 EnableAudibleDefaultEndpointSubmixesCVar = 0;
FAutoConsoleVariableRef CVarEnableAudibleDefaultEndpointSubmixes(
TEXT("au.submix.audibledefaultendpoints"),
EnableAudibleDefaultEndpointSubmixesCVar,
TEXT("Allows audio sent to defaulted (typically silent) endpoint submixes to be audible via master. (useful for debugging)\n")
TEXT("0: Disabled (Default), 1: Enabled"),
ECVF_Default);
static int32 DebugGeneratorEnableCVar = 0;
FAutoConsoleVariableRef CVarDebugGeneratorEnable(
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:936
Scope (from outer to inner):
file
namespace Audio
function bool FMixerDevice::OnProcessAudioStream
Source code excerpt:
FScopeLock ScopeLock(&EndpointSubmixesMutationLock);
if (EnableAudibleDefaultEndpointSubmixesCVar !=0 )
{
for (const FMixerSubmixPtr& Submix : DefaultEndpointSubmixes)
{
// If this hit, a submix was added to the default submix endpoint array
// even though it's not an endpoint, or a parent was set on an endpoint submix
// and it wasn't removed from DefaultEndpointSubmixes.