au.InteriorData.UseIActiveSoundUpdate

au.InteriorData.UseIActiveSoundUpdate

#Overview

name: au.InteriorData.UseIActiveSoundUpdate

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.InteriorData.UseIActiveSoundUpdate is to control whether the system gathers interior data from subsystems that implement the IActiveSoundUpdate interface. This setting is primarily used in the audio system of Unreal Engine 5.

This setting variable is utilized in the Engine module, specifically within the ActiveSound functionality. Based on the callsites, it’s evident that this variable is crucial for the audio rendering system, particularly for handling interior sound properties.

The value of this variable is set using an FAutoConsoleVariableRef, which allows it to be modified at runtime through console commands. By default, it is set to 1 (enabled).

The associated variable GatherInteriorDataFromIActiveSoundUpdateCVar directly interacts with au.InteriorData.UseIActiveSoundUpdate. They share the same value, and GatherInteriorDataFromIActiveSoundUpdateCVar is used in the actual code logic to determine whether to gather interior data.

Developers must be aware that:

  1. This variable affects how interior sound properties are calculated.
  2. Changing this setting can impact performance and audio quality in interior environments.
  3. It works in conjunction with other audio-related settings, such as GatherInteriorDataFromAudioVolumesCVar.

Best practices when using this variable include:

  1. Keep it enabled (set to 1) unless there’s a specific reason to disable it.
  2. Test audio quality in various interior environments when modifying this setting.
  3. Consider performance implications, especially in scenes with complex interior spaces.

Regarding the associated variable GatherInteriorDataFromIActiveSoundUpdateCVar:

Its purpose is to serve as the actual boolean flag used in the code logic to determine whether to gather interior data from IActiveSoundUpdate interfaces.

This variable is used directly in the Engine module, specifically in the FActiveSound::UpdateWaveInstances function.

Its value is set by the au.InteriorData.UseIActiveSoundUpdate console variable.

It interacts closely with GatherInteriorDataFromAudioVolumesCVar, another flag used for gathering interior data.

Developers should be aware that this variable directly affects the behavior of the UpdateWaveInstances function, which is crucial for sound processing in interior spaces.

Best practices include ensuring consistency between this variable and the console variable setting, and considering its impact on audio processing when optimizing performance.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ActiveSound.cpp:31

Scope: file

Source code excerpt:

static int32 GatherInteriorDataFromIActiveSoundUpdateCVar = 1;
FAutoConsoleVariableRef CVarGatherInteriorDataFromIActiveSoundUpdate(
	TEXT("au.InteriorData.UseIActiveSoundUpdate"),
	GatherInteriorDataFromIActiveSoundUpdateCVar,
	TEXT("When set to 1, allows gathering of interior data from subsystems that implement the IActiveSoundUpdate interface.\n")
	TEXT("0: Disabled, 1: Enabled (default)"),
	ECVF_Default);

static int32 InitializeFocusFactorOnFirstUpdateCVar = 1;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ActiveSound.cpp:29

Scope: file

Source code excerpt:

	ECVF_Default);

static int32 GatherInteriorDataFromIActiveSoundUpdateCVar = 1;
FAutoConsoleVariableRef CVarGatherInteriorDataFromIActiveSoundUpdate(
	TEXT("au.InteriorData.UseIActiveSoundUpdate"),
	GatherInteriorDataFromIActiveSoundUpdateCVar,
	TEXT("When set to 1, allows gathering of interior data from subsystems that implement the IActiveSoundUpdate interface.\n")
	TEXT("0: Disabled, 1: Enabled (default)"),
	ECVF_Default);

static int32 InitializeFocusFactorOnFirstUpdateCVar = 1;
FAutoConsoleVariableRef CVarInitializeFocusFactorOnFirstUpdateCVar(

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ActiveSound.cpp:796

Scope (from outer to inner):

file
function     void FActiveSound::UpdateWaveInstances

Source code excerpt:

		const bool bNeedsInteriorUpdate = (!bGotInteriorSettings || (ParseParams.Transform.GetTranslation() - LastLocation).SizeSquared() > UE_KINDA_SMALL_NUMBER);
		const bool bUseAudioVolumes = GatherInteriorDataFromAudioVolumesCVar != 0;
		const bool bUseActiveSoundUpdate = GatherInteriorDataFromIActiveSoundUpdateCVar != 0;

		// Gather data from interior spaces
		if (bNeedsInteriorUpdate)
		{
			if (bUseAudioVolumes)
			{