Navigation
API > API/Runtime > API/Runtime/Engine
The base class for a playable sound object
| Name | USoundBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Sound/SoundBase.h |
| Include Path | #include "Sound/SoundBase.h" |
Syntax
UCLASS (Config=Engine, HideCategories=Object, Abstract, EditInlineNew, BlueprintType, MinimalAPI)
class USoundBase :
public UObject ,
public IAudioPropertiesSheetAssetUserInterface ,
public IInterface_AssetUserData
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USoundBase
Implements Interfaces
Derived Classes
USoundBase derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USoundBase
(
const FObjectInitializer& ObjectInitializer |
Sound/SoundBase.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetUserData | TArray< TObjectPtr< UAssetUserData > > | Array of user data stored with the asset | Sound/SoundBase.h |
|
| AttenuationSettings | TObjectPtr< USoundAttenuation > | Attenuation settings package for the sound | Sound/SoundBase.h |
|
| AudioPropertiesSheet | TObjectPtr< UAudioPropertiesSheetAssetBase > | Sound/SoundBase.h |
|
|
| bBypassVolumeScaleForPriority | uint8 | Bypass volume weighting priority upon evaluating whether sound should remain active when max channel count is met (See platform Audio Settings). | Sound/SoundBase.h |
|
| bDebug | uint8 | When "au.3dVisualize.Attenuation" has been specified, draw this sound's attenuation shape when the sound is audible. | Sound/SoundBase.h |
|
| bEnableBaseSubmix | uint8 | If enabled, sound will route to the Master Submix by default or to the Base Submix if defined. | Sound/SoundBase.h |
|
| bEnableBusSends | uint8 | Whether or not to enable sending this audio's output to buses. | Sound/SoundBase.h |
|
| bEnableSubmixSends | uint8 | Whether or not to enable Submix Sends other than the Base Submix. | Sound/SoundBase.h |
|
| bHasConcatenatorNode | uint8 | Whether or not this sound has a concatenator node. | Sound/SoundBase.h | |
| bHasDelayNode | uint8 | Whether or not this sound has a delay node | Sound/SoundBase.h | |
| bOverrideConcurrency | uint8 | Whether or not to override the sound concurrency object with local concurrency settings. | Sound/SoundBase.h |
|
| BusSends | TArray< FSoundSourceBusSendInfo > | This sound will send its audio output to this list of buses if there are bus instances playing after source effects are processed. | Sound/SoundBase.h |
|
| ConcurrencyOverrides | FSoundConcurrencySettings | If Override Concurrency is true, concurrency settings to use. | Sound/SoundBase.h |
|
| ConcurrencySet | TSet< TObjectPtr< USoundConcurrency > > | Set of concurrency settings to observe (if override is set to false). | Sound/SoundBase.h |
|
| CurrentPlayCount | TMap< Audio::FDeviceId, int32 > | Map of device handle to number of times this sound is currently being played using that device(counted if sound is virtualized). | Sound/SoundBase.h | |
| Duration | float | Duration of sound in seconds. | Sound/SoundBase.h |
|
| MaxDistance | float | The MaxDistance property is calculated statically on load or at asset edit time, but is not reliable at runtime. | Sound/SoundBase.h |
|
| PreEffectBusSends | TArray< FSoundSourceBusSendInfo > | This sound will send its audio output to this list of buses if there are bus instances playing before source effects are processed. | Sound/SoundBase.h |
|
| Priority | float | Used to determine whether sound can play or remain active if channel limit is met, where higher value is higher priority (see platform's Audio Settings 'Max Channels' property). | Sound/SoundBase.h |
|
| SoundClassObject | TObjectPtr< USoundClass > | Sound class this sound belongs to | Sound/SoundBase.h |
|
| SoundSubmixObject | TObjectPtr< USoundSubmixBase > | Submix to route sound output to. | Sound/SoundBase.h |
|
| SoundSubmixSends | TArray< FSoundSubmixSendInfo > | Array of submix sends to which a prescribed amount (see 'Send Level') of this sound is sent. | Sound/SoundBase.h |
|
| SourceEffectChain | TObjectPtr< USoundEffectSourcePresetChain > | The source effect chain to use for this sound. | Sound/SoundBase.h |
|
| TotalSamples | float | Total number of samples (in the thousands). | Sound/SoundBase.h |
|
| VirtualizationMode | EVirtualizationMode | Virtualization behavior, determining if a sound may revive and how it continues playing when culled or evicted (limited to looping sounds). | Sound/SoundBase.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LocalAudioProperties | TArray< FName > | Sound/SoundBase.h | ||
| TimecodeOffset | FSoundTimecodeOffset | Sound/SoundBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< Audio::IParameterTransmitter > CreateParameterTransmitter
(
Audio::FParameterTransmitterInitParams&& InParams |
Creates a parameter transmitter for communicating with active sound instances. | Sound/SoundBase.h | |
virtual ISoundGeneratorPtr CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams |
Creates a sound generator instance from this sound base. | Sound/SoundBase.h | |
virtual ISoundGeneratorPtr CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams, |
Creates a sound generator instance from this sound base. | Sound/SoundBase.h | |
virtual bool EnableSubmixSendsOnPreview() |
Whether or not this sound allows submix sends on preview. | Sound/SoundBase.h | |
virtual bool GetAllDefaultParameters
(
TArray< FAudioParameter >& OutParameters |
Gets all the default parameters for this Asset. | Sound/SoundBase.h | |
virtual const FSoundAttenuationSettings * GetAttenuationSettingsToApply() |
Returns a pointer to the attenuation settings that are to be applied for this node | Sound/SoundBase.h | |
void GetConcurrencyHandles
(
TArray< FConcurrencyHandle >& OutConcurrencyHandles |
Returns an array of FSoundConcurrencySettings handles. | Sound/SoundBase.h | |
virtual UCurveTable * GetCurveData () |
Returns curves associated with this sound if it has any. | Sound/SoundBase.h | |
virtual float GetDuration() |
Returns the length of the sound | Sound/SoundBase.h | |
virtual float GetMaxDistance() |
Returns the farthest distance at which the sound could be heard | Sound/SoundBase.h | |
virtual float GetPitchMultiplier() |
Sound/SoundBase.h | ||
float GetPriority() |
Returns the priority to use when evaluating concurrency. | Sound/SoundBase.h | |
virtual USoundClass * GetSoundClass() |
Returns the SoundClass used for this sound. | Sound/SoundBase.h | |
void GetSoundSourceBusSends
(
EBusSendType BusSendType, |
Returns the sound source sends for this sound. | Sound/SoundBase.h | |
virtual USoundSubmixBase * GetSoundSubmix() |
Returns the SoundSubmix used for this sound. | Sound/SoundBase.h | |
void GetSoundSubmixSends
(
TArray< FSoundSubmixSendInfo >& OutSends |
Returns the sound submix sends for this sound. | Sound/SoundBase.h | |
virtual bool GetSoundWavesWithCookedAnalysisData
(
TArray< USoundWave* >& OutSoundWaves |
Returns whether the sound has cooked analysis data (e.g. FFT or envelope following data) and returns sound waves which have cooked data. | Sound/SoundBase.h | |
virtual float GetSubtitlePriority() |
Returns the subtitle priority | Sound/SoundBase.h | |
TOptional< FSoundTimecodeOffset > GetTimecodeOffset() |
Sound/SoundBase.h | ||
virtual float GetVolumeMultiplier() |
Sound/SoundBase.h | ||
virtual bool HasAttenuationNode() |
Returns whether or not this sound base has an attenuation node. | Sound/SoundBase.h | |
bool HasConcatenatorNode() |
Returns whether or not this sound has a sequencer node, which means it's possible for the owning active sound to persist even though it's not generating audio. | Sound/SoundBase.h | |
virtual bool HasCookedAmplitudeEnvelopeData() |
Sound/SoundBase.h | ||
virtual bool HasCookedFFTData() |
Queries if the sound has cooked FFT or envelope data. | Sound/SoundBase.h | |
bool HasDelayNode() |
Returns whether or not this sound has a delay node, which means it's possible for the sound to not generate audio for a while. | Sound/SoundBase.h | |
virtual bool ImplementsParameterInterface
(
Audio::FParameterInterfacePtr InParameterInterface |
Whether or not the given sound is a generator and implements an interface with the given name. | Sound/SoundBase.h | |
virtual void InitParameters
(
TArray< FAudioParameter >& ParametersToInit, |
Called from the Game Thread prior to attempting to pass parameters to the ParameterTransmitter. | Sound/SoundBase.h | |
virtual void InitResources() |
Called from the Game Thread prior to attempting to initialize a sound instance. | Sound/SoundBase.h | |
virtual bool IsAttenuationSettingsEditable() |
Only used as an edit condition for AttenuationSettings member, as base classes may choose to provide an attenuation override implementation | Sound/SoundBase.h | |
virtual bool IsLooping () |
Returns whether or not this sound is looping. | Sound/SoundBase.h | |
virtual bool IsOneShot() |
Query if it's one shot. One shot is defined as a sound which is intended to have a fixed duration. | Sound/SoundBase.h | |
virtual bool IsParameterValid
(
const FAudioParameter& InParameter |
Returns whether parameter is valid input for the given sound | Sound/SoundBase.h | |
virtual bool IsPlayable() |
Returns whether the sound base is set up in a playable manner | Sound/SoundBase.h | |
virtual bool IsPlayWhenSilent() |
Returns true if any of the sounds in the sound have "play when silent" enabled. | Sound/SoundBase.h | |
virtual bool IsProcedurallyGenerated() |
Query if it's a procedurally generated sound. | Sound/SoundBase.h | |
virtual void Parse
(
FAudioDevice* AudioDevice, |
Parses the Sound to generate the WaveInstances to play. | Sound/SoundBase.h | |
void SetTimecodeOffset
(
const FSoundTimecodeOffset& InTimecodeOffset |
Sound/SoundBase.h | ||
virtual bool ShouldApplyInteriorVolumes() |
Returns whether or not any part of this sound wants interior volumes applied to it | Sound/SoundBase.h | |
virtual bool SupportsSubtitles() |
Returns whether sound supports subtitles. | Sound/SoundBase.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Sound/SoundBase.h | ||
virtual void PostLoad() |
Sound/SoundBase.h | ||
virtual void PreEditChange
(
FProperty* PropertyAboutToChange |
Sound/SoundBase.h | ||
virtual void Serialize
(
FArchive& Ar |
Sound/SoundBase.h |
Overridden from UObjectBaseUtility
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeClusterRoot() |
Sound/SoundBase.h | ||
virtual bool CanBeInCluster() |
Sound/SoundBase.h |
Overridden from IAudioPropertiesSheetAssetUserInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AllowPropertyParsing
(
const FProperty& TargetProperty |
Sound/SoundBase.h | ||
virtual void IgnorePropertyParsing
(
const FProperty& PropertyToIgnore |
Sound/SoundBase.h | ||
virtual bool ShouldParseProperty
(
const FProperty& TargetProperty |
Sound/SoundBase.h |
Overridden from IInterface_AssetUserData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddAssetUserData
(
UAssetUserData* InUserData |
Sound/SoundBase.h | ||
virtual const TArray< UAssetUserData * > * GetAssetUserDataArray() |
Sound/SoundBase.h | ||
virtual UAssetUserData * GetAssetUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Returns an instance of the provided AssetUserData class if it's contained in the target asset. | Sound/SoundBase.h | |
virtual void RemoveUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Sound/SoundBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual float ComputeMaxDistance() |
Sound/SoundBase.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasVirtualizeWhenSilent_DEPRECATED | uint8 | Sound/SoundBase.h | ||
| bOutputToBusOnly_DEPRECATED | uint8 | Whether or not to only send this audio's output to a bus. | Sound/SoundBase.h | |
| MaxConcurrentPlayCount_DEPRECATED | int32 | Maximum number of times this sound can be played concurrently. | Sound/SoundBase.h | |
| MaxConcurrentResolutionRule_DEPRECATED | TEnumAsByte< EMaxConcurrentResolutionRule::Type > | Sound/SoundBase.h | ||
| SoundConcurrencySettings_DEPRECATED | TObjectPtr< USoundConcurrency > | If Override Concurrency is false, the sound concurrency settings to use for this sound. | Sound/SoundBase.h |