au.Debug.Soundcues.ShowPath

au.Debug.Soundcues.ShowPath

#Overview

name: au.Debug.Soundcues.ShowPath

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of au.Debug.Soundcues.ShowPath is to control the display of the full path of sound cues in the audio debugging system. This setting variable is part of Unreal Engine’s audio debugging capabilities.

This setting variable is primarily used in the audio debugging subsystem of Unreal Engine. Based on the callsites, it’s specifically utilized in the Engine module, within the AudioDebug.cpp file.

The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, meaning it’s enabled by default. Developers can change this value at runtime using console commands.

The au.Debug.Soundcues.ShowPath variable interacts directly with the SoundCueDebugShowPathCVar variable. They share the same value, with SoundCueDebugShowPathCVar being the actual integer variable used in the code logic.

Developers should be aware that this variable affects the verbosity of audio debugging output. When enabled (set to 1), it will cause the full path of sound cues to be displayed in debug views. This can be useful for identifying and troubleshooting issues with specific sound cues, but may also increase the amount of information displayed, potentially cluttering debug output.

Best practices for using this variable include:

  1. Enabling it (set to 1) when debugging specific sound cue issues or when needing to identify the exact sound cue being played.
  2. Disabling it (set to 0) when not actively debugging sound cues to reduce clutter in debug output.
  3. Using it in conjunction with other audio debugging tools for a comprehensive view of the audio system’s state.

Regarding the associated variable SoundCueDebugShowPathCVar:

The purpose of SoundCueDebugShowPathCVar is to serve as the actual integer variable that stores the state of the au.Debug.Soundcues.ShowPath setting. It’s used directly in the code logic to determine whether to display the full path of sound cues.

This variable is part of the audio debugging system in the Engine module. It’s used specifically in the FAudioDebugger::RenderStatCues function to control the rendering of sound cue paths.

The value of SoundCueDebugShowPathCVar is set through the CVar system, initialized to 1 by default. It can be modified at runtime through the au.Debug.Soundcues.ShowPath console command.

SoundCueDebugShowPathCVar interacts directly with the au.Debug.Soundcues.ShowPath CVar, reflecting its value in the actual code logic.

Developers should be aware that modifying SoundCueDebugShowPathCVar directly in code is not recommended. Instead, they should use the au.Debug.Soundcues.ShowPath console command to ensure consistency between the CVar and the variable.

Best practices for SoundCueDebugShowPathCVar include:

  1. Treat it as a read-only variable in most code contexts.
  2. Use it for conditional logic in audio debugging rendering functions.
  3. Rely on the CVar system for modifying its value rather than direct assignment.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:102

Scope: file

Source code excerpt:

static int32 SoundCueDebugShowPathCVar = 1;
FAutoConsoleVariableRef CVarAudioSoundCueDebugShowPath(
	TEXT("au.Debug.Soundcues.ShowPath"),
	SoundCueDebugShowPathCVar,
	TEXT("Display full path of sound cue when enabled.\n")
	TEXT("0: Not Enabled, 1: Enabled"),
	ECVF_Default);

static int32 SoundCueDebugShowDistanceCVar = 0;

#Associated Variable and Callsites

This variable is associated with another variable named SoundCueDebugShowPathCVar. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:100

Scope: file

Source code excerpt:

	ECVF_Default);

static int32 SoundCueDebugShowPathCVar = 1;
FAutoConsoleVariableRef CVarAudioSoundCueDebugShowPath(
	TEXT("au.Debug.Soundcues.ShowPath"),
	SoundCueDebugShowPathCVar,
	TEXT("Display full path of sound cue when enabled.\n")
	TEXT("0: Not Enabled, 1: Enabled"),
	ECVF_Default);

static int32 SoundCueDebugShowDistanceCVar = 0;
FAutoConsoleVariableRef CVarAudioSoundCueDebugShowDistance(

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:1596

Scope (from outer to inner):

file
namespace    Audio
function     int32 FAudioDebugger::RenderStatCues

Source code excerpt:

						Canvas->DrawShadowedString(CurrentX, Y, *StatSoundInfo.SoundClassName.ToString(), StatsFont, bMutedOrSoloed ? Color : FColor::Yellow);

						if (SoundCueDebugShowPathCVar)
						{
							CurrentX += (TabbedClass * CharSpacing);
							Canvas->DrawShadowedString(CurrentX, Y, *PathAndMuting, StatsFont, Color);
						}

						Y += FontHeight;