au.AllowReverbForMultichannelSources
au.AllowReverbForMultichannelSources
#Overview
name: au.AllowReverbForMultichannelSources
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Controls if we allow Reverb processing for sources with channel counts > 2.\n0: Disable, >0: Enable
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.AllowReverbForMultichannelSources is to control whether reverb processing is allowed for audio sources with more than two channels in Unreal Engine’s audio system.
This setting variable is primarily used in the audio subsystem of Unreal Engine, specifically within the sound wave processing module. It is referenced in the Engine/Source/Runtime/Engine/Private/SoundWave.cpp file, which is part of the core engine’s audio processing code.
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be modified at runtime through the console. By default, it is set to 1, enabling reverb processing for multichannel sources.
The associated variable AllowReverbForMultichannelSources directly interacts with au.AllowReverbForMultichannelSources. They share the same value and are used interchangeably in the code.
Developers must be aware that this variable affects the reverb processing for audio sources with more than two channels. When set to 0, it disables reverb for these multichannel sources, which can impact the perceived audio quality and spatial characteristics of the sound.
Best practices when using this variable include:
- Consider the performance implications of enabling reverb for multichannel sources, as it may increase CPU usage.
- Test the audio quality with this setting both enabled and disabled to determine the best configuration for your specific project.
- Be mindful of how this setting interacts with other audio processing features in your game.
Regarding the associated variable AllowReverbForMultichannelSources:
This variable is an integer used internally in the SoundWave.cpp file. It directly reflects the value of the au.AllowReverbForMultichannelSources console variable. The purpose and usage are identical to au.AllowReverbForMultichannelSources.
It is used in the USoundWave::Parse function to determine whether reverb should be applied to a specific wave instance. The code checks if the number of channels is greater than 2 and uses this variable to decide whether to allow reverb processing.
Developers should be aware that modifying AllowReverbForMultichannelSources directly in the code will not persist across sessions or be configurable via the console. Instead, they should use the au.AllowReverbForMultichannelSources console variable to control this setting.
Best practices for using AllowReverbForMultichannelSources include:
- Avoid modifying this variable directly in the code unless absolutely necessary.
- Use the console variable au.AllowReverbForMultichannelSources for runtime configuration.
- Consider the implications on audio processing and performance when changing this value.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundWave.cpp:80
Scope: file
Source code excerpt:
static int32 AllowReverbForMultichannelSources = 1;
FAutoConsoleVariableRef CvarAllowReverbForMultichannelSources(
TEXT("au.AllowReverbForMultichannelSources"),
AllowReverbForMultichannelSources,
TEXT("Controls if we allow Reverb processing for sources with channel counts > 2.\n")
TEXT("0: Disable, >0: Enable"),
ECVF_Default);
inline FArchive& operator<<(FArchive& Ar, FSoundWaveCuePoint& CuePoint)
#Associated Variable and Callsites
This variable is associated with another variable named AllowReverbForMultichannelSources
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundWave.cpp:78
Scope: file
Source code excerpt:
ECVF_Default);
static int32 AllowReverbForMultichannelSources = 1;
FAutoConsoleVariableRef CvarAllowReverbForMultichannelSources(
TEXT("au.AllowReverbForMultichannelSources"),
AllowReverbForMultichannelSources,
TEXT("Controls if we allow Reverb processing for sources with channel counts > 2.\n")
TEXT("0: Disable, >0: Enable"),
ECVF_Default);
inline FArchive& operator<<(FArchive& Ar, FSoundWaveCuePoint& CuePoint)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundWave.cpp:3423
Scope (from outer to inner):
file
function void USoundWave::Parse
Source code excerpt:
// Update reverb send levels.
WaveInstance->bReverb = WaveInstance->bReverb && !WaveInstance->bIsMusic && (AllowReverbForMultichannelSources || WaveInstance->WaveData->NumChannels <= 2);
if (WaveInstance->bReverb)
{
if (ParseParams.ReverbSendMethod == EReverbSendMethod::Manual)
{
WaveInstance->ReverbSendLevel = FMath::Clamp(ParseParams.ManualReverbSendLevel, 0.0f, 1.0f);
}