MonoChannelUpmixMethod
MonoChannelUpmixMethod
#Overview
name: MonoChannelUpmixMethod
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 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of MonoChannelUpmixMethod is to determine the method used for upmixing mono audio channels to multi-channel output in the Unreal Engine audio system.
This setting variable is primarily used by the Audio Mixer subsystem of Unreal Engine. It is referenced in the AudioMixer module, specifically in the FMixerDevice class, which is responsible for handling audio mixing operations.
The value of this variable is set in two places:
- During the initialization of the audio hardware in FMixerDevice::InitializeHardware().
- When updating the audio hardware in FMixerDevice::UpdateHardware().
In both cases, the value is obtained from the UAudioSettings class, which suggests that this setting can be configured through the project’s audio settings.
The MonoChannelUpmixMethod interacts with other audio-related variables, particularly in the process of caching channel maps. It’s used in conjunction with bIsCenterChannelOnly to determine how mono channels should be upmixed to multi-channel output.
Developers should be aware that this variable affects how mono audio is distributed across multiple output channels. The chosen method can impact the perceived spatial characteristics of the sound.
Best practices when using this variable include:
- Consider the target platform and typical audio setups of your audience when choosing the upmix method.
- Test the audio output with different upmix methods to ensure the best quality and spatial representation for your specific audio content.
- Be consistent in its usage across your project to maintain a uniform audio experience.
- Document the chosen method and the reasoning behind it for future reference and for team communication.
- Be aware that changing this setting may require re-evaluation of existing audio mixes in your project.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:265, section: [/Script/Engine.AudioSettings]
- INI Section:
/Script/Engine.AudioSettings
- Raw value:
EqualPower
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerChannelMaps.cpp:154
Scope (from outer to inner):
file
namespace Audio
function void FMixerDevice::CacheChannelMap
Source code excerpt:
Params.bIsCenterChannelOnly = bIsCenterChannelOnly;
switch (MonoChannelUpmixMethod)
{
case EMonoChannelUpmixMethod::Linear:
Params.MonoUpmixMethod = EChannelMapMonoUpmixMethod::Linear;
break;
case EMonoChannelUpmixMethod::EqualPower:
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:518
Scope (from outer to inner):
file
namespace Audio
function bool FMixerDevice::InitializeHardware
Source code excerpt:
const UAudioSettings* AudioSettings = GetDefault<UAudioSettings>();
MonoChannelUpmixMethod = AudioSettings->MonoChannelUpmixMethod;
PanningMethod = AudioSettings->PanningMethod;
// Set whether we're the main audio mixer
bIsMainAudioMixer = IsMainAudioDevice();
AUDIO_MIXER_CHECK(SampleRate != 0.0f);
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerDevice.cpp:730
Scope (from outer to inner):
file
namespace Audio
function void FMixerDevice::UpdateHardware
Source code excerpt:
{
const UAudioSettings* AudioSettings = GetDefault<UAudioSettings>();
MonoChannelUpmixMethod = AudioSettings->MonoChannelUpmixMethod;
PanningMethod = AudioSettings->PanningMethod;
}
SourceManager->Update();
AudioMixerPlatform->OnHardwareUpdate();
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Public/AudioMixerDevice.h:326
Scope (from outer to inner):
file
namespace Audio
class class FMixerDevice : public FAudioDevice, public IAudioMixer, public FGCObject
function EMonoChannelUpmixMethod GetMonoChannelUpmixMethod
Source code excerpt:
double GetAudioClockDelta() const { return AudioClockDelta; }
EMonoChannelUpmixMethod GetMonoChannelUpmixMethod() const { return MonoChannelUpmixMethod; }
AUDIOMIXER_API TArray<Audio::FChannelPositionInfo>* GetDefaultPositionMap(int32 NumChannels);
static AUDIOMIXER_API bool IsEndpointSubmix(const USoundSubmixBase* InSubmix);
AUDIOMIXER_API FPatchOutputStrongPtr MakePatch(int32 InFrames, int32 InChannels, float InGain) const;
#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Public/AudioMixerDevice.h:412
Scope (from outer to inner):
file
namespace Audio
class class FMixerDevice : public FAudioDevice, public IAudioMixer, public FGCObject
Source code excerpt:
/** What upmix method to use for mono channel upmixing. */
EMonoChannelUpmixMethod MonoChannelUpmixMethod;
/** What panning method to use for panning. */
EPanningMethod PanningMethod;
/** The audio output stream parameters used to initialize the audio hardware. */
FAudioMixerOpenStreamParams OpenStreamParams;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Sound/AudioSettings.h:228
Scope (from outer to inner):
file
class class UAudioSettings : public UDeveloperSettings
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category = "Mix", AdvancedDisplay)
EMonoChannelUpmixMethod MonoChannelUpmixMethod;
/**
* The format string to use when generating the filename for contexts within dialogue waves. This must generate unique names for your project.
* Available format markers:
* * {DialogueGuid} - The GUID of the dialogue wave. Guaranteed to be unique and stable against asset renames.
* * {DialogueHash} - The hash of the dialogue wave. Not guaranteed to be unique or stable against asset renames, however may be unique enough if combined with the dialogue name.