au.adpcm.DisableSeeking
au.adpcm.DisableSeeking
#Overview
name: au.adpcm.DisableSeeking
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Disables seeking with ADPCM.\n
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.adpcm.DisableSeeking is to control seeking functionality in ADPCM (Adaptive Differential Pulse-Code Modulation) audio decoding within Unreal Engine 5. This setting variable is part of the audio system, specifically related to the ADPCM audio decoder.
The Unreal Engine subsystem that relies on this setting variable is the AdpcmAudioDecoder module, which is responsible for decoding ADPCM-encoded audio files.
The value of this variable is set through the console variable system in Unreal Engine. It is initialized with a default value of 0 (false) and can be changed at runtime using console commands or through configuration files.
The associated variable bDisableADPCMSeekingCVar directly interacts with au.adpcm.DisableSeeking. They share the same value, with bDisableADPCMSeekingCVar being the actual integer variable used in the code to control the seeking behavior.
Developers must be aware that when this variable is set to true (non-zero), it will disable seeking functionality in ADPCM audio playback. This means that operations like jumping to a specific time in the audio or restarting playback from the beginning may not work as expected.
Best practices when using this variable include:
- Only enable it if there’s a specific need to disable seeking in ADPCM audio.
- Be aware that disabling seeking may affect user experience in scenarios where audio navigation is important.
- Consider the performance implications of enabling or disabling seeking, as it may impact memory usage and processing time.
Regarding the associated variable bDisableADPCMSeekingCVar:
The purpose of bDisableADPCMSeekingCVar is to provide a direct, code-level access to the au.adpcm.DisableSeeking setting. It is used within the FADPCMAudioInfo class to control seeking behavior.
This variable is used in the AdpcmAudioDecoder module, specifically in the implementation of the FADPCMAudioInfo class.
The value of bDisableADPCMSeekingCVar is set through the console variable system, mirroring the value of au.adpcm.DisableSeeking.
It directly interacts with the au.adpcm.DisableSeeking console variable, serving as its in-code representation.
Developers should be aware that this variable is checked in the SeekToTime and SeekToFrame functions of FADPCMAudioInfo. When true, these functions will return immediately without performing any seeking operations.
Best practices for using bDisableADPCMSeekingCVar include:
- Avoid modifying this variable directly in code; instead, use the console variable system to change au.adpcm.DisableSeeking.
- When implementing new audio-related features that involve ADPCM, check this variable to ensure consistent behavior with the engine’s seeking settings.
- Consider adding appropriate debug logging when this variable affects behavior, to aid in troubleshooting.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AdpcmAudioDecoder/Module/Private/ADPCMAudioInfo.cpp:6
Scope: file
Source code excerpt:
static int32 bDisableADPCMSeekingCVar = 0;
FAutoConsoleVariableRef CVarDisableADPCMSeeking(
TEXT("au.adpcm.DisableSeeking"),
bDisableADPCMSeekingCVar,
TEXT("Disables seeking with ADPCM.\n"),
ECVF_Default);
static int32 ADPCMReadFailiureTimeoutCVar = 64;
FAutoConsoleVariableRef CVarADPCMReadFailiureTimeout(
#Associated Variable and Callsites
This variable is associated with another variable named bDisableADPCMSeekingCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/AdpcmAudioDecoder/Module/Private/ADPCMAudioInfo.cpp:4
Scope: file
Source code excerpt:
#include "Interfaces/IAudioFormat.h"
static int32 bDisableADPCMSeekingCVar = 0;
FAutoConsoleVariableRef CVarDisableADPCMSeeking(
TEXT("au.adpcm.DisableSeeking"),
bDisableADPCMSeekingCVar,
TEXT("Disables seeking with ADPCM.\n"),
ECVF_Default);
static int32 ADPCMReadFailiureTimeoutCVar = 64;
FAutoConsoleVariableRef CVarADPCMReadFailiureTimeout(
TEXT("au.adpcm.ADPCMReadFailiureTimeout"),
#Loc: <Workspace>/Engine/Source/Runtime/AdpcmAudioDecoder/Module/Private/ADPCMAudioInfo.cpp:82
Scope (from outer to inner):
file
function void FADPCMAudioInfo::SeekToTime
Source code excerpt:
void FADPCMAudioInfo::SeekToTime(const float InSeekTime)
{
if (bDisableADPCMSeekingCVar)
{
return;
}
const uint32 SamplesPerSec = *WaveInfo.pSamplesPerSec;
TargetSeekFrame = static_cast<uint32>(InSeekTime * SamplesPerSec);
#Loc: <Workspace>/Engine/Source/Runtime/AdpcmAudioDecoder/Module/Private/ADPCMAudioInfo.cpp:94
Scope (from outer to inner):
file
function void FADPCMAudioInfo::SeekToFrame
Source code excerpt:
void FADPCMAudioInfo::SeekToFrame(const uint32 InSeekFrame)
{
if (bDisableADPCMSeekingCVar)
{
return;
}
TargetSeekFrame = InSeekFrame;
bNewSeekRequest = true;