au.AudioGameplayVolume.UpdateRate.JitterDelta
au.AudioGameplayVolume.UpdateRate.JitterDelta
#Overview
name: au.AudioGameplayVolume.UpdateRate.JitterDelta
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
A random delta to add to update rate to avoid performance heartbeats.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.AudioGameplayVolume.UpdateRate.JitterDelta is to add a random delta to the update rate of the Audio Gameplay Volume system to avoid performance heartbeats.
This setting variable is primarily used by the Audio Gameplay Volume subsystem, which is part of the AudioGameplayVolume plugin in Unreal Engine 5. Based on the callsites, it’s specifically utilized in the AudioGameplayVolumeSubsystem.
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be adjusted at runtime through console commands. It’s initialized with a default value of 0.025f.
The associated variable UpdateRateJitterDelta interacts directly with au.AudioGameplayVolume.UpdateRate.JitterDelta. They share the same value and are used interchangeably in the code.
Developers must be aware that this variable affects the timing of updates in the Audio Gameplay Volume system. It introduces a small random variation to the update rate, which can help prevent synchronization issues or performance spikes that might occur if all updates happened at exactly the same intervals.
Best practices when using this variable include:
- Keeping the value relatively small to avoid significant fluctuations in update timing.
- Monitoring performance to ensure the jitter doesn’t introduce unwanted side effects.
- Adjusting the value based on the specific needs of the game or application, particularly if there are performance issues related to Audio Gameplay Volume updates.
Regarding the associated variable UpdateRateJitterDelta:
The purpose of UpdateRateJitterDelta is identical to au.AudioGameplayVolume.UpdateRate.JitterDelta, as they share the same value and purpose.
It’s used within the AudioGameplayVolumeSubsystem, specifically in the Update function, where it’s used to calculate a random jitter for the next update delta time.
The value is set in the same place as au.AudioGameplayVolume.UpdateRate.JitterDelta, through the FAutoConsoleVariableRef.
It interacts with other variables in the AudioGameplayVolumeConsoleVariables namespace, particularly UpdateRate and MinUpdateRate, to determine the timing of the next update.
Developers should be aware that this variable directly affects the timing of Audio Gameplay Volume updates and should be adjusted carefully.
Best practices for UpdateRateJitterDelta are the same as for au.AudioGameplayVolume.UpdateRate.JitterDelta, focusing on maintaining smooth performance while avoiding synchronization issues.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/AudioGameplayVolume/Source/AudioGameplayVolume/Private/AudioGameplayVolumeSubsystem.cpp:39
Scope (from outer to inner):
file
namespace AudioGameplayVolumeConsoleVariables
Source code excerpt:
float UpdateRateJitterDelta = 0.025f;
FAutoConsoleVariableRef CVarUpdateRateJitterDelta(
TEXT("au.AudioGameplayVolume.UpdateRate.JitterDelta"),
UpdateRateJitterDelta,
TEXT("A random delta to add to update rate to avoid performance heartbeats."),
ECVF_Default);
int32 bAudioThreadCmdRollback = 0;
FAutoConsoleVariableRef CVarAudioThreadCmdRollback(
#Associated Variable and Callsites
This variable is associated with another variable named UpdateRateJitterDelta
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/AudioGameplayVolume/Source/AudioGameplayVolume/Private/AudioGameplayVolumeSubsystem.cpp:37
Scope (from outer to inner):
file
namespace AudioGameplayVolumeConsoleVariables
Source code excerpt:
ECVF_Default);
float UpdateRateJitterDelta = 0.025f;
FAutoConsoleVariableRef CVarUpdateRateJitterDelta(
TEXT("au.AudioGameplayVolume.UpdateRate.JitterDelta"),
UpdateRateJitterDelta,
TEXT("A random delta to add to update rate to avoid performance heartbeats."),
ECVF_Default);
int32 bAudioThreadCmdRollback = 0;
FAutoConsoleVariableRef CVarAudioThreadCmdRollback(
TEXT("au.AudioGameplayVolumes.AudioThreadCmdRollback"),
#Loc: <Workspace>/Engine/Plugins/AudioGameplayVolume/Source/AudioGameplayVolume/Private/AudioGameplayVolumeSubsystem.cpp:191
Scope (from outer to inner):
file
function void UAudioGameplayVolumeSubsystem::Update
Source code excerpt:
}
const float JitterDelta = FMath::RandRange(0.f, AudioGameplayVolumeConsoleVariables::UpdateRateJitterDelta);
NextUpdateDeltaTime = FMath::Max(AudioGameplayVolumeConsoleVariables::UpdateRate + JitterDelta, AudioGameplayVolumeConsoleVariables::MinUpdateRate);
TimeSinceUpdate = 0.f;
if (bHasStaleProxy)
{
FAudioDeviceHandle AudioDeviceHandle = GetAudioDeviceHandle();