au.Debug.SoundCues.Spacing.Tab
au.Debug.SoundCues.Spacing.Tab
#Overview
name: au.Debug.SoundCues.Spacing.Tab
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Size of tab (in characters) with compact view. \nDefault: 5
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.Debug.SoundCues.Spacing.Tab
is to control the size of tab spacing (in characters) when displaying debug information for Sound Cues in a compact view.
This setting variable is primarily used in the Unreal Engine’s audio debugging system, specifically within the Engine module. It’s part of the audio debug rendering functionality.
The value of this variable is set using an FAutoConsoleVariableRef
named CVarAudioSoundCueDebugTabSpacing
. It’s initialized with a default value of 5 characters but can be changed at runtime through the console.
This variable interacts closely with another variable named SoundCueDebugTabSpacingCVar
. They share the same value, with SoundCueDebugTabSpacingCVar
being the actual storage for the setting, while au.Debug.SoundCues.Spacing.Tab
is the console-accessible name.
Developers should be aware that this variable affects the visual layout of debug information for Sound Cues. Changing its value will alter the spacing in the debug output, which could affect readability.
Best practices when using this variable include:
- Keeping the value reasonable (the code clamps it to a minimum of 1)
- Considering the relationship between this variable and
au.Debug.SoundCues.Spacing.Char
(represented bySoundCueDebugCharSpacingCVar
) for optimal layout - Using it in conjunction with other audio debugging tools for comprehensive analysis
Regarding the associated variable SoundCueDebugTabSpacingCVar
:
The purpose of SoundCueDebugTabSpacingCVar
is to store the actual integer value for the tab spacing used in Sound Cue debugging.
This variable is used directly in the audio debugging system, specifically in the FAudioDebugger::RenderStatCues
function within the Engine module.
The value of this variable is set through the console variable au.Debug.SoundCues.Spacing.Tab
, as discussed earlier.
It interacts directly with the console variable system and is used in calculations for formatting debug output.
Developers should be aware that this variable is clamped to a minimum value of 1 when used, ensuring that there’s always at least some spacing.
Best practices for this variable include:
- Accessing it through the console variable system rather than directly, to ensure consistency
- Considering its impact on debug output readability when modifying its value
- Using it in conjunction with
SoundCueDebugCharSpacingCVar
for optimal debug output formatting
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:126
Scope: file
Source code excerpt:
static int32 SoundCueDebugTabSpacingCVar = 5;
FAutoConsoleVariableRef CVarAudioSoundCueDebugTabSpacing(
TEXT("au.Debug.SoundCues.Spacing.Tab"),
SoundCueDebugTabSpacingCVar,
TEXT("Size of tab (in characters) with compact view. \n")
TEXT("Default: 5"),
ECVF_Default);
static int32 SoundCueDebugCharSpacingCVar = 7;
#Associated Variable and Callsites
This variable is associated with another variable named SoundCueDebugTabSpacingCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:124
Scope: file
Source code excerpt:
ECVF_Default);
static int32 SoundCueDebugTabSpacingCVar = 5;
FAutoConsoleVariableRef CVarAudioSoundCueDebugTabSpacing(
TEXT("au.Debug.SoundCues.Spacing.Tab"),
SoundCueDebugTabSpacingCVar,
TEXT("Size of tab (in characters) with compact view. \n")
TEXT("Default: 5"),
ECVF_Default);
static int32 SoundCueDebugCharSpacingCVar = 7;
FAutoConsoleVariableRef CVarSoundCueDebugCharSpacing(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:1527
Scope (from outer to inner):
file
namespace Audio
function int32 FAudioDebugger::RenderStatCues
Source code excerpt:
static int32 PrevClassLength = 0;
const int32 TabSpacing = FMath::Clamp(SoundCueDebugTabSpacingCVar, 1, SoundCueDebugTabSpacingCVar);
const int32 CharSpacing = FMath::Clamp(SoundCueDebugCharSpacingCVar, 1, SoundCueDebugCharSpacingCVar);
const int32 NumberSpacing = 6 * CharSpacing; // 6 character len for 2 decimal float + 2 spaces 'X.XX '
// Tab out name and class length and reset previous length counters
int32 TabbedName = (PrevNameLength / TabSpacing + 1) * TabSpacing;
int32 TabbedClass = (PrevClassLength / TabSpacing + 1) * TabSpacing;