au.AudioGameplayVolumes.Listeners.AllowUpdate

au.AudioGameplayVolumes.Listeners.AllowUpdate

#Overview

name: au.AudioGameplayVolumes.Listeners.AllowUpdate

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.AudioGameplayVolumes.Listeners.AllowUpdate is to control whether the Audio Gameplay Volume system should update its listeners. This setting variable is part of the audio system, specifically related to the Audio Gameplay Volume functionality in Unreal Engine 5.

This setting variable is primarily used by the AudioGameplayVolume plugin, which is part of Unreal Engine’s audio subsystem. Based on the callsites, it’s clear that this variable is utilized within the AudioGameplayVolumeSubsystem.

The value of this variable is set through the Unreal Engine console variable system. It’s defined as an FAutoConsoleVariableRef, which means it can be changed at runtime through console commands or configuration files.

The associated variable bUpdateListeners directly interacts with au.AudioGameplayVolumes.Listeners.AllowUpdate. They share the same value, and bUpdateListeners is used in the actual logic of the AudioGameplayVolumeSubsystem.

Developers must be aware that this variable acts as a switch to enable or disable the updating of listeners in the Audio Gameplay Volume system. When set to 0, it will prevent the UpdateFromListeners() function from being called in the UAudioGameplayVolumeSubsystem::Update method.

Best practices when using this variable include:

  1. Use it for debugging or performance optimization purposes.
  2. Be cautious when disabling listener updates, as it may affect the accuracy of audio positioning and other audio-related features.
  3. Remember that it can be changed at runtime, which allows for dynamic adjustments during gameplay or testing.

Regarding the associated variable bUpdateListeners:

#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:24

Scope (from outer to inner):

file
namespace    AudioGameplayVolumeConsoleVariables

Source code excerpt:

	int32 bUpdateListeners = 1;
	FAutoConsoleVariableRef CVarUpdateListeners(
		TEXT("au.AudioGameplayVolumes.Listeners.AllowUpdate"),
		bUpdateListeners,
		TEXT("Allows updating of listeners.\n0: Disable, 1: Enable (default)"),
		ECVF_Default);

	float MinUpdateRate = 0.016f;
	float UpdateRate = 0.05f;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/AudioGameplayVolume/Source/AudioGameplayVolume/Private/AudioGameplayVolumeSubsystem.cpp:22

Scope (from outer to inner):

file
namespace    AudioGameplayVolumeConsoleVariables

Source code excerpt:

		ECVF_Default);

	int32 bUpdateListeners = 1;
	FAutoConsoleVariableRef CVarUpdateListeners(
		TEXT("au.AudioGameplayVolumes.Listeners.AllowUpdate"),
		bUpdateListeners,
		TEXT("Allows updating of listeners.\n0: Disable, 1: Enable (default)"),
		ECVF_Default);

	float MinUpdateRate = 0.016f;
	float UpdateRate = 0.05f;
	FAutoConsoleVariableRef CVarUpdateInterval(

#Loc: <Workspace>/Engine/Plugins/AudioGameplayVolume/Source/AudioGameplayVolume/Private/AudioGameplayVolumeSubsystem.cpp:205

Scope (from outer to inner):

file
function     void UAudioGameplayVolumeSubsystem::Update

Source code excerpt:

	}

	if (AudioGameplayVolumeConsoleVariables::bUpdateListeners != 0)
	{
		UpdateFromListeners();
	}

	PreviousProxyCount = KnownProxyIDs.Num();
}