au.BypassAllSubmixEffects
au.BypassAllSubmixEffects
#Overview
name: au.BypassAllSubmixEffects
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When set to 1, all submix effects will be bypassed.\n1: Submix Effects are disabled.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.BypassAllSubmixEffects is to control whether all submix effects in the audio system are bypassed or not. This setting variable is part of Unreal Engine’s audio mixer system.
The Unreal Engine subsystem that relies on this setting variable is the Audio Mixer module, specifically the submix processing part of the audio system. This can be seen from the file location (AudioMixerSubmix.cpp) and the context in which it’s used.
The value of this variable is set through a console variable (CVar) system. It’s initialized to 0 and can be changed at runtime using console commands or through code.
The associated variable BypassAllSubmixEffectsCVar interacts directly with au.BypassAllSubmixEffects. They share the same value, with BypassAllSubmixEffectsCVar being the actual integer variable that stores the state, while au.BypassAllSubmixEffects is the console variable name used to access and modify this state.
Developers must be aware that setting this variable to 1 will disable all submix effects in the audio system. This can have a significant impact on the game’s audio quality and performance. It should be used carefully, typically for debugging or performance testing purposes.
Best practices when using this variable include:
- Use it temporarily for debugging or performance analysis.
- Always remember to reset it to 0 when finished testing.
- Be cautious about changing this in a shipping game, as it can dramatically alter the audio experience.
- Consider creating a user-friendly way to toggle this setting if it’s intended to be used as a performance option.
Regarding the associated variable BypassAllSubmixEffectsCVar:
- Its purpose is to store the actual integer value that determines whether submix effects are bypassed.
- It’s used directly in the audio processing code to determine whether to apply submix effects.
- The value is set through the au.BypassAllSubmixEffects console variable.
- It interacts with the audio processing logic in the ProcessAudio function of the FMixerSubmix class.
- Developers should be aware that this variable is checked during audio processing, so changing it will have an immediate effect on the audio output.
- Best practices include using this variable through the console variable system rather than modifying it directly, to ensure consistency with the engine’s state tracking.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSubmix.cpp:32
Scope: file
Source code excerpt:
static int32 BypassAllSubmixEffectsCVar = 0;
FAutoConsoleVariableRef CVarBypassAllSubmixEffects(
TEXT("au.BypassAllSubmixEffects"),
BypassAllSubmixEffectsCVar,
TEXT("When set to 1, all submix effects will be bypassed.\n")
TEXT("1: Submix Effects are disabled."),
ECVF_Default);
static int32 LogSubmixEnablementCVar = 0;
#Associated Variable and Callsites
This variable is associated with another variable named BypassAllSubmixEffectsCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSubmix.cpp:30
Scope: file
Source code excerpt:
ECVF_Default);
static int32 BypassAllSubmixEffectsCVar = 0;
FAutoConsoleVariableRef CVarBypassAllSubmixEffects(
TEXT("au.BypassAllSubmixEffects"),
BypassAllSubmixEffectsCVar,
TEXT("When set to 1, all submix effects will be bypassed.\n")
TEXT("1: Submix Effects are disabled."),
ECVF_Default);
static int32 LogSubmixEnablementCVar = 0;
FAutoConsoleVariableRef CVarLogSubmixEnablement(
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSubmix.cpp:1357
Scope (from outer to inner):
file
namespace Audio
function void FMixerSubmix::ProcessAudio
Source code excerpt:
FScopeLock ScopeLock(&EffectChainMutationCriticalSection);
if (!BypassAllSubmixEffectsCVar && EffectChains.Num() > 0)
{
CSV_SCOPED_TIMING_STAT(Audio, SubmixEffectProcessing);
SCOPE_CYCLE_COUNTER(STAT_AudioMixerSubmixEffectProcessing);
float SampleRate = MixerDevice->GetSampleRate();
check(SampleRate > 0.0f);