au.DisableLegacyReverb
au.DisableLegacyReverb
#Overview
name: au.DisableLegacyReverb
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Disables reverb on legacy audio backends.\n0: Enabled, 1: Disabled
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.DisableLegacyReverb is to control whether reverb is enabled or disabled on legacy audio backends in Unreal Engine 5. It is part of the audio system configuration.
This setting variable is primarily used by the Engine’s audio subsystem, specifically within the AudioDevice module. The variable is defined and used in the AudioDevice.cpp file, which is a core component of Unreal Engine’s audio system.
The value of this variable is set through the Unreal Engine console variable system. It is initialized as a static integer with a default value of 0 (enabled) and can be modified at runtime using console commands.
The associated variable DisableLegacyReverb directly interacts with au.DisableLegacyReverb. They share the same value, with DisableLegacyReverb being the actual integer variable used in the code, while au.DisableLegacyReverb is the console variable name used for external access and configuration.
Developers must be aware that this variable affects legacy audio backends specifically. When set to 1, it disables reverb for these backends, which could impact the audio quality and behavior in games using older audio systems.
Best practices when using this variable include:
- Only disable legacy reverb if there are performance issues or conflicts with newer audio systems.
- Test thoroughly after changing this setting to ensure desired audio behavior.
- Document any changes to this setting in project configurations to maintain consistency across the development team.
Regarding the associated variable DisableLegacyReverb: Its purpose is to serve as the actual storage for the au.DisableLegacyReverb setting within the C++ code. It is used internally by the audio system to determine whether legacy reverb should be disabled.
The DisableLegacyReverb variable is accessed in the LegacyReverbDisabled() function of the FAudioDevice class. This function returns true if DisableLegacyReverb is not equal to 0, effectively translating the integer value into a boolean for use in audio processing logic.
Developers should be aware that modifying DisableLegacyReverb directly in the code is not recommended. Instead, they should use the console variable au.DisableLegacyReverb to ensure proper integration with the engine’s configuration system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp:127
Scope: file
Source code excerpt:
static int32 DisableLegacyReverb = 0;
FAutoConsoleVariableRef CVarDisableLegacyReverb(
TEXT("au.DisableLegacyReverb"),
DisableLegacyReverb,
TEXT("Disables reverb on legacy audio backends.\n")
TEXT("0: Enabled, 1: Disabled"),
ECVF_Default);
static float SoundDistanceOptimizationLengthCVar = 1.0f;
#Associated Variable and Callsites
This variable is associated with another variable named DisableLegacyReverb
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp:125
Scope: file
Source code excerpt:
ECVF_Default);
static int32 DisableLegacyReverb = 0;
FAutoConsoleVariableRef CVarDisableLegacyReverb(
TEXT("au.DisableLegacyReverb"),
DisableLegacyReverb,
TEXT("Disables reverb on legacy audio backends.\n")
TEXT("0: Enabled, 1: Disabled"),
ECVF_Default);
static float SoundDistanceOptimizationLengthCVar = 1.0f;
FAutoConsoleVariableRef CVarSoundDistanceOptimizationLength(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp:6954
Scope (from outer to inner):
file
function bool FAudioDevice::LegacyReverbDisabled
Source code excerpt:
bool FAudioDevice::LegacyReverbDisabled()
{
return DisableLegacyReverb != 0;
}
void FAudioDevice::RegisterPluginListener(const TAudioPluginListenerPtr PluginListener)
{
PluginListeners.AddUnique(PluginListener);
}