au.submix.clearbrokensubmixassets

au.submix.clearbrokensubmixassets

#Overview

name: au.submix.clearbrokensubmixassets

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.submix.clearbrokensubmixassets is to manage the integrity of sound submix asset relationships in the Unreal Engine audio system. It’s specifically designed to address issues with broken or inconsistent parent-child relationships between submix assets.

This setting variable is primarily used in the Unreal Engine’s audio system, particularly within the sound submix functionality. It’s referenced in the Engine module, specifically in the SoundSubmix.cpp file.

The value of this variable is set through the console variable system in Unreal Engine. It’s initialized to 0 and can be changed at runtime using console commands.

The associated variable ClearBrokenSubmixAssetsCVar directly interacts with au.submix.clearbrokensubmixassets. They share the same value, with ClearBrokenSubmixAssetsCVar being the C++ variable that’s used in the code to check the setting’s value.

Developers must be aware that:

  1. This variable is a boolean flag (0 for disabled, >0 for enabled).
  2. When enabled, it triggers a verification process for submix parent-child relationships.
  3. It’s used in the USoundSubmixBase::PostLoad function, which suggests it affects asset loading behavior.

Best practices when using this variable include:

  1. Use it for debugging or fixing issues with sound submix assets, not in regular production builds.
  2. Be cautious when enabling it, as it may affect performance during asset loading.
  3. After using it to fix broken submix relationships, disable it to avoid unnecessary checks.

Regarding the associated variable ClearBrokenSubmixAssetsCVar:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:23

Scope: file

Source code excerpt:

static int32 ClearBrokenSubmixAssetsCVar = 0;
FAutoConsoleVariableRef CVarFixUpBrokenSubmixAssets(
	TEXT("au.submix.clearbrokensubmixassets"),
	ClearBrokenSubmixAssetsCVar,
	TEXT("If set, will verify that we don't have a submix that lists a child submix that is no longer its child, and the former children will not erroneously list their previous parents.\n")
	TEXT("0: Disable, >0: Enable"),
	ECVF_Default);

namespace SoundSubmixPrivate

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:21

Scope: file

Source code excerpt:

#include "SoundSubmixCustomVersion.h"

static int32 ClearBrokenSubmixAssetsCVar = 0;
FAutoConsoleVariableRef CVarFixUpBrokenSubmixAssets(
	TEXT("au.submix.clearbrokensubmixassets"),
	ClearBrokenSubmixAssetsCVar,
	TEXT("If set, will verify that we don't have a submix that lists a child submix that is no longer its child, and the former children will not erroneously list their previous parents.\n")
	TEXT("0: Disable, >0: Enable"),
	ECVF_Default);

namespace SoundSubmixPrivate
{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:539

Scope (from outer to inner):

file
function     void USoundSubmixBase::PostLoad

Source code excerpt:

	Super::PostLoad();

	if (ClearBrokenSubmixAssetsCVar)
	{
		for (int32 ChildIndex = ChildSubmixes.Num() - 1; ChildIndex >= 0; ChildIndex--)
		{
			USoundSubmixBase* ChildSubmix = ChildSubmixes[ChildIndex];

			if (!ChildSubmix)