au.DefaultModulationPlugin

au.DefaultModulationPlugin

#Overview

name: au.DefaultModulationPlugin

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.DefaultModulationPlugin is to specify the name of the default modulation plugin to load and use in the audio system of Unreal Engine 5. This setting variable is primarily related to the audio subsystem of the engine.

The Unreal Engine audio subsystem relies on this setting variable, particularly within the Engine module. It’s used in the AudioPluginUtilities.cpp file, which suggests it’s part of the audio plugin management system.

The value of this variable is set through a console variable (CVar) system. It’s initialized as an empty string and can be modified at runtime or through configuration files.

This variable interacts closely with DefaultModulationPluginCVar, which is a static FString that stores the actual value of the console variable. The au.DefaultModulationPlugin CVar is essentially a wrapper around DefaultModulationPluginCVar, providing an interface to set and retrieve its value.

Developers should be aware that this variable can be overridden by platform-specific implementation names in the config files. This allows for different default modulation plugins to be used on different platforms if necessary.

Best practices when using this variable include:

  1. Ensuring that the specified plugin name actually exists and is compatible with the current platform.
  2. Being cautious when changing this value at runtime, as it may affect ongoing audio processing.
  3. Documenting any custom modulation plugins that may be set as the default, to maintain clarity in the project’s audio setup.

Regarding the associated variable DefaultModulationPluginCVar:

The purpose of DefaultModulationPluginCVar is to store the actual string value of the default modulation plugin name. It serves as the backing storage for the au.DefaultModulationPlugin console variable.

This variable is used within the Engine module, specifically in the AudioPluginUtilities.cpp file. It’s part of the audio plugin management system.

The value of DefaultModulationPluginCVar is initially set to an empty string. It can be modified through the au.DefaultModulationPlugin console variable.

DefaultModulationPluginCVar interacts directly with the au.DefaultModulationPlugin CVar and is used in the GetDefaultModulationPluginName function to determine the name of the default modulation plugin.

Developers should be aware that this variable is not meant to be accessed directly in most cases. Instead, they should use the au.DefaultModulationPlugin CVar or the GetDefaultModulationPluginName function to retrieve the current default modulation plugin name.

Best practices for this variable include:

  1. Avoiding direct modification of DefaultModulationPluginCVar. Instead, use the provided CVar interface.
  2. Being aware that changes to this variable (via the CVar) will affect the behavior of GetDefaultModulationPluginName.
  3. Ensuring that any code relying on the default modulation plugin can handle potential changes to this value at runtime.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioPluginUtilities.cpp:10

Scope: file

Source code excerpt:

static FString DefaultModulationPluginCVar = TEXT("");
FAutoConsoleVariableRef CVarActiveModulationPlugin(
	TEXT("au.DefaultModulationPlugin"),
	DefaultModulationPluginCVar,
	TEXT("Name of default modulation plugin to load and use (overridden "
	"by platform-specific implementation name in config.\n"),
	ECVF_Default);

/** Get the target setting name for each platform type. */

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioPluginUtilities.cpp:8

Scope: file

Source code excerpt:



static FString DefaultModulationPluginCVar = TEXT("");
FAutoConsoleVariableRef CVarActiveModulationPlugin(
	TEXT("au.DefaultModulationPlugin"),
	DefaultModulationPluginCVar,
	TEXT("Name of default modulation plugin to load and use (overridden "
	"by platform-specific implementation name in config.\n"),
	ECVF_Default);

/** Get the target setting name for each platform type. */
FORCEINLINE const TCHAR* GetPluginConfigName(EAudioPlugin PluginType)

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioPluginUtilities.cpp:175

Scope (from outer to inner):

file
function     const FName& AudioPluginUtilities::GetDefaultModulationPluginName

Source code excerpt:

	static FName DefaultModulationPluginName(TEXT("DefaultModulationPlugin"));

	if (!DefaultModulationPluginCVar.IsEmpty())
	{
		DefaultModulationPluginName = FName(*DefaultModulationPluginCVar);
	}

	return DefaultModulationPluginName;
}