HighSampleRate
HighSampleRate
#Overview
name: HighSampleRate
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 7
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of HighSampleRate is to define the high-quality sample rate for audio resampling in Unreal Engine 5. It is used as part of the audio system’s configuration for different platforms and quality settings.
This setting variable is primarily used in the audio subsystem of Unreal Engine 5, specifically for platform-specific audio settings. It is referenced in the following modules and platform-specific settings:
- Windows Target Platform
- Android Runtime Settings
- iOS Runtime Settings
The value of this variable is typically set in the constructor of the respective platform settings classes (UWindowsTargetSettings, UAndroidRuntimeSettings, UIOSRuntimeSettings). The default value is usually 32000 Hz.
HighSampleRate interacts with other sample rate variables such as MaxSampleRate, MedSampleRate, LowSampleRate, and MinSampleRate. These variables collectively define the range of sample rates available for audio resampling on different platforms.
Developers should be aware that:
- This variable affects audio quality and performance on the target platform.
- Changes to this value may impact the overall audio experience and resource usage.
- The actual sample rate used may depend on the capabilities of the target device.
Best practices when using this variable include:
- Consider the target platform’s hardware capabilities when adjusting this value.
- Balance audio quality with performance requirements.
- Test thoroughly on target devices to ensure optimal audio playback.
- Coordinate changes with the audio team to maintain the intended audio quality across different platforms.
- Be consistent with the values set for other sample rate variables to ensure a coherent audio experience across quality settings.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:316, section: [/Script/WindowsTargetPlatform.WindowsTargetSettings]
- INI Section:
/Script/WindowsTargetPlatform.WindowsTargetSettings
- Raw value:
32000.000000
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/Windows/WindowsTargetPlatform/Classes/WindowsTargetSettings.h:123
Scope (from outer to inner):
file
class class UWindowsTargetSettings : public UObject
Source code excerpt:
UPROPERTY(GlobalConfig, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "High"))
float HighSampleRate;
UPROPERTY(GlobalConfig, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Medium"))
float MedSampleRate;
UPROPERTY(GlobalConfig, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Low"))
float LowSampleRate;
#Loc: <Workspace>/Engine/Source/Developer/Windows/WindowsTargetPlatform/Private/WindowsTargetPlatformClasses.cpp:9
Scope (from outer to inner):
file
function UWindowsTargetSettings::UWindowsTargetSettings
Source code excerpt:
, CacheSizeKB(65536)
, MaxSampleRate(48000)
, HighSampleRate(32000)
, MedSampleRate(24000)
, LowSampleRate(12000)
, MinSampleRate(8000)
, CompressionQualityModifier(1)
{
// Default windows settings
#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Classes/AndroidRuntimeSettings.h:623
Scope (from outer to inner):
file
class class UAndroidRuntimeSettings : public UObject
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "High"))
float HighSampleRate;
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Medium"))
float MedSampleRate;
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Low"))
float LowSampleRate;
#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Private/AndroidRuntimeSettings.cpp:34
Scope (from outer to inner):
file
function UAndroidRuntimeSettings::UAndroidRuntimeSettings
Source code excerpt:
, CacheSizeKB(65536)
, MaxSampleRate(48000)
, HighSampleRate(32000)
, MedSampleRate(24000)
, LowSampleRate(12000)
, MinSampleRate(8000)
, CompressionQualityModifier(1)
, bMultiTargetFormat_ETC2(true)
, bMultiTargetFormat_DXT(true)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioCompressionSettingsUtils.cpp:218
Scope (from outer to inner):
file
function void CacheAudioCookOverrides
Source code excerpt:
RetrievedSampleRate = -1.0f;
PlatformFile.GetFloat(*CategoryName, TEXT("HighSampleRate"), RetrievedSampleRate);
OutOverrides.PlatformSampleRates.Add(ESoundwaveSampleRateSettings::High, RetrievedSampleRate);
RetrievedSampleRate = -1.0f;
PlatformFile.GetFloat(*CategoryName, TEXT("MedSampleRate"), RetrievedSampleRate);
OutOverrides.PlatformSampleRates.Add(ESoundwaveSampleRateSettings::Medium, RetrievedSampleRate);
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:570
Scope (from outer to inner):
file
class class UIOSRuntimeSettings : public UObject
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "High"))
float HighSampleRate;
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Medium"))
float MedSampleRate;
UPROPERTY(config, EditAnywhere, Category = "Audio|CookOverrides|ResamplingQuality", meta = (DisplayName = "Low"))
float LowSampleRate;
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Private/IOSRuntimeSettings.cpp:19
Scope (from outer to inner):
file
function UIOSRuntimeSettings::UIOSRuntimeSettings
Source code excerpt:
, CacheSizeKB(65536)
, MaxSampleRate(48000)
, HighSampleRate(32000)
, MedSampleRate(24000)
, LowSampleRate(12000)
, MinSampleRate(8000)
, CompressionQualityModifier(1)
{
bEnableGameCenterSupport = true;