AudioMixerModuleName
AudioMixerModuleName
#Overview
name: AudioMixerModuleName
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AudioMixerModuleName is to specify the name of the audio mixer module to be used in the Unreal Engine’s audio system. This variable is crucial for determining which audio implementation will be utilized by the engine.
AudioMixerModuleName is primarily used by the Engine’s audio subsystem, specifically within the AudioDeviceManager. This can be seen from the references in the AudioDeviceManager.cpp and AudioDeviceManager.h files.
The value of this variable is set from the game’s configuration file. Specifically, it’s read from the “Audio” section of the engine configuration file (GEngineIni) using the key “AudioMixerModuleName”.
This variable interacts with the AudioDeviceModule pointer, which is loaded based on the AudioMixerModuleName value. It’s used in the LoadDefaultAudioDeviceModule function to determine which audio module to load.
Developers must be aware that:
- This variable directly affects which audio implementation is used.
- Changing this value could have significant impacts on audio performance and features.
- The specified module must exist and be compatible with the current engine version.
Best practices when using this variable include:
- Ensure the specified module name is correct and the module is available in your project.
- Be cautious when modifying this value, as it can affect the entire audio system.
- Consider platform-specific requirements when setting this value.
- Document any custom audio mixer modules used in your project.
- Test thoroughly after changing this value to ensure audio functionality remains intact across all supported platforms.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/AndroidEngine.ini:20, section: [Audio]
- INI Section:
Audio
- Raw value:
AudioMixerAndroid
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/BaseIOSEngine.ini:35, section: [Audio]
- INI Section:
Audio
- Raw value:
AudioMixerAudioUnit
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/BaseMacEngine.ini:4, section: [Audio]
- INI Section:
Audio
- Raw value:
AudioMixerCoreAudio
- Is Array:
False
Location: <Workspace>/Engine/Config/Unix/UnixEngine.ini:2, section: [Audio]
- INI Section:
Audio
- Raw value:
AudioMixerSDL
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/WindowsEngine.ini:3, section: [Audio]
- INI Section:
Audio
- Raw value:
AudioMixerXAudio2
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDeviceManager.cpp:191
Scope (from outer to inner):
file
function FAudioDeviceManager::~FAudioDeviceManager
Source code excerpt:
FAudioDeviceManager::~FAudioDeviceManager()
{
UE_LOG(LogAudio, Display, TEXT("Beginning Audio Device Manager Shutdown (Module: %s)..."), *AudioMixerModuleName);
TArray<Audio::FDeviceId> DeviceIds;
{
FScopeLock ScopeLock(&DeviceMapCriticalSection);
Devices.GetKeys(DeviceIds);
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDeviceManager.cpp:441
Scope (from outer to inner):
file
function bool FAudioDeviceManager::LoadDefaultAudioDeviceModule
Source code excerpt:
// If not using command line switch to use audio mixer, check the game platform engine ini file (e.g. WindowsEngine.ini) which enables it for player
GConfig->GetString(TEXT("Audio"), TEXT("AudioMixerModuleName"), AudioMixerModuleName, GEngineIni);
if (bForceNonRealtimeRenderer)
{
AudioDeviceModule = FModuleManager::LoadModulePtr<IAudioDeviceModule>(TEXT("NonRealtimeAudioRenderer"));
return AudioDeviceModule != nullptr;
}
if (AudioMixerModuleName.Len() > 0)
{
AudioDeviceModule = FModuleManager::LoadModulePtr<IAudioDeviceModule>(*AudioMixerModuleName);
}
return AudioDeviceModule != nullptr;
}
FAudioDeviceHandle FAudioDeviceManager::CreateNewDevice(const FAudioDeviceParams& InParams)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/AudioDeviceManager.h:327
Scope (from outer to inner):
file
class class FAudioDeviceManager
Source code excerpt:
/** The audio mixer module name. This is the audio mixer module name to use. E.g. AudioMixerXAudio2 */
FString AudioMixerModuleName;
/** Handle to the main audio device. */
FAudioDeviceHandle MainAudioDeviceHandle;
struct FAudioDeviceContainer
{