BaseDefaultSubmix

BaseDefaultSubmix

#Overview

name: BaseDefaultSubmix

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of BaseDefaultSubmix is to define the default submix for implicit submix sends in the audio system of Unreal Engine 5. It serves as a fallback option when a base submix send is null or when a submix parent is not specified.

This setting variable is primarily used by the Audio Mixer subsystem of Unreal Engine 5. It is referenced in the AudioMixer module and the Engine module, specifically in the FMixerDevice and UAudioSettings classes.

The value of BaseDefaultSubmix is set in the project settings, as it is defined as a config property in the UAudioSettings class. It is of type FSoftObjectPath, which allows for referencing a SoundSubmix asset.

BaseDefaultSubmix interacts with other audio-related variables, such as MasterSubmix and ReverbSubmix, which are also part of the UAudioSettings class. It is used in conjunction with these variables to initialize the sound submix system in the FMixerDevice::InitSoundSubmixes function.

Developers must be aware that changing the BaseDefaultSubmix value requires a restart of the engine for the changes to take effect. This is evident from the PostEditChangeChainProperty function in the UAudioSettings class, where a prompt for restart is triggered when this variable is modified.

Best practices when using this variable include:

  1. Ensuring that the referenced SoundSubmix asset exists and is properly configured.
  2. Being cautious when modifying this setting, as it affects the overall audio routing in the project.
  3. Considering the impact on performance and audio quality when selecting a base default submix.
  4. Documenting any custom submix hierarchies that rely on this setting to maintain clarity in the audio system design.
  5. Testing thoroughly after making changes to ensure that all audio components in the project are routing correctly through the new base default submix.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:252, section: [/Script/Engine.AudioSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:1166

Scope (from outer to inner):

file
namespace    Audio
function     void FMixerDevice::InitSoundSubmixes

Source code excerpt:

			LoadRequiredSubmix(ERequiredSubmixes::Main, TEXT("MasterSubmixDefault"), false /* DefaultMuteWhenBackgrounded */, AudioSettings->MasterSubmix);

			// BaseDefaultSubmix is an optional master submix type set by project settings
			if (AudioSettings->BaseDefaultSubmix.IsValid())
			{
				LoadRequiredSubmix(ERequiredSubmixes::BaseDefault, TEXT("BaseDefault"), false /* DefaultMuteWhenBackgrounded */, AudioSettings->BaseDefaultSubmix);
			}

			LoadRequiredSubmix(ERequiredSubmixes::Reverb, TEXT("MasterReverbSubmixDefault"), true /* DefaultMuteWhenBackgrounded */, AudioSettings->ReverbSubmix);

			if (!DisableSubmixEffectEQCvar)
			{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Sound/AudioSettings.h:158

Scope (from outer to inner):

file
class        class UAudioSettings : public UDeveloperSettings

Source code excerpt:

	/** The default submix to use for implicit submix sends (i.e. if the base submix send is null or if a submix parent is null) */
	UPROPERTY(config, EditAnywhere, Category = "Mix", meta = (AllowedClasses = "/Script/Engine.SoundSubmix"), AdvancedDisplay)
	FSoftObjectPath BaseDefaultSubmix;

	/** The submix through which all sounds set to use reverb are routed */
	UPROPERTY(config, EditAnywhere, Category="Mix", meta=(AllowedClasses="/Script/Engine.SoundSubmix"))
	FSoftObjectPath ReverbSubmix;

	/** The submix through which all sounds set to use legacy EQ system are routed */

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioSettings.cpp:82

Scope (from outer to inner):

file
function     void UAudioSettings::PostEditChangeChainProperty

Source code excerpt:

			bPromptRestartRequired = true;
		}
		else if (PropertyName == GET_MEMBER_NAME_CHECKED(UAudioSettings, BaseDefaultSubmix))
		{
			bPromptRestartRequired = true;
		}
		else if(PropertyName == GET_MEMBER_NAME_CHECKED(UAudioSettings, EQSubmix)
			|| PropertyName == GET_MEMBER_NAME_CHECKED(UAudioSettings, ReverbSubmix))
		{