au.EnableDetailedWindowsDeviceLogging
au.EnableDetailedWindowsDeviceLogging
#Overview
name: au.EnableDetailedWindowsDeviceLogging
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enables detailed windows device logging.\n0: Not Enabled, 1: Enabled
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.EnableDetailedWindowsDeviceLogging is to enable detailed logging for Windows audio devices in the Unreal Engine audio system. This setting variable is primarily used for debugging and diagnostics of audio-related issues on Windows platforms.
This setting variable is part of the Audio Mixer subsystem within Unreal Engine. It is specifically referenced in the AudioMixerCore module, which is responsible for handling low-level audio mixing operations.
The value of this variable is set through a console variable (CVar) system. It is initialized to 0 (disabled) by default, but can be changed at runtime or through configuration files.
The au.EnableDetailedWindowsDeviceLogging variable interacts directly with the EnableDetailedWindowsDeviceLoggingCVar variable. They share the same value, with the CVar acting as the internal representation of the console-accessible setting.
Developers should be aware that enabling this logging can potentially impact performance, especially in debug builds or when extensive audio device changes occur. It should primarily be used for troubleshooting audio device issues on Windows platforms.
Best practices for using this variable include:
- Only enable it when necessary for debugging audio device problems.
- Disable it in release builds to avoid any potential performance overhead.
- Use in conjunction with other audio debugging tools and logs for comprehensive analysis.
Regarding the associated variable EnableDetailedWindowsDeviceLoggingCVar:
The purpose of EnableDetailedWindowsDeviceLoggingCVar is to serve as the internal representation of the au.EnableDetailedWindowsDeviceLogging setting. It is used directly in the engine code to determine whether detailed Windows device logging should be enabled.
This variable is part of the AudioMixerCore module and is used within the Audio namespace. It is primarily accessed through the IAudioMixer interface.
The value of EnableDetailedWindowsDeviceLoggingCVar is set by the console variable system when au.EnableDetailedWindowsDeviceLogging is modified.
It interacts directly with the ShouldLogDeviceSwaps() function in the IAudioMixer interface, which returns true if the variable is non-zero.
Developers should be aware that this variable is intended for internal use within the engine. They should not modify it directly but instead use the au.EnableDetailedWindowsDeviceLogging console variable to control the logging behavior.
Best practices for this variable include:
- Avoid direct manipulation; use the console variable system instead.
- When extending the audio mixer system, respect the value of this variable for consistent logging behavior.
- Consider the performance implications when frequently checking this variable in performance-critical code paths.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixerCore/Private/AudioMixer.cpp:66
Scope: file
Source code excerpt:
static int32 EnableDetailedWindowsDeviceLoggingCVar = 0;
FAutoConsoleVariableRef CVarEnableDetailedWindowsDeviceLogging(
TEXT("au.EnableDetailedWindowsDeviceLogging"),
EnableDetailedWindowsDeviceLoggingCVar,
TEXT("Enables detailed windows device logging.\n")
TEXT("0: Not Enabled, 1: Enabled"),
ECVF_Default);
static int32 DisableDeviceSwapCVar = 0;
#Associated Variable and Callsites
This variable is associated with another variable named EnableDetailedWindowsDeviceLoggingCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixerCore/Private/AudioMixer.cpp:64
Scope: file
Source code excerpt:
static int32 EnableDetailedWindowsDeviceLoggingCVar = 0;
FAutoConsoleVariableRef CVarEnableDetailedWindowsDeviceLogging(
TEXT("au.EnableDetailedWindowsDeviceLogging"),
EnableDetailedWindowsDeviceLoggingCVar,
TEXT("Enables detailed windows device logging.\n")
TEXT("0: Not Enabled, 1: Enabled"),
ECVF_Default);
static int32 DisableDeviceSwapCVar = 0;
FAutoConsoleVariableRef CVarDisableDeviceSwap(
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixerCore/Private/AudioMixer.cpp:896
Scope (from outer to inner):
file
namespace Audio
function bool IAudioMixer::ShouldLogDeviceSwaps
Source code excerpt:
bool IAudioMixer::ShouldLogDeviceSwaps()
{
return EnableDetailedWindowsDeviceLoggingCVar != 0;
}
bool IAudioMixer::ShouldUseThreadedDeviceSwap()
{
return bUseThreadedDeviceSwapCVar != 0;
}