Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Sound
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USoundBase
- UDialogueSoundWaveProxy
- USoundCue
- USoundCueTemplate
- USoundCueContainer
- USoundCueDistanceCrossfade
- USoundMod
- USoundSimple
- USoundWave
- USoundSourceBus
- USoundWaveProcedural
- UMetaSoundSource
- USoundModWave
- USynthSound
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Sound/SoundBase.h |
| Include | #include "Sound/SoundBase.h" |
Syntax
class USoundBase :
public UObject,
public IInterface_AssetUserData
Remarks
The base class for a playable sound object
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TObjectPtr< UAssetUserData > > | AssetUserData | Array of user data stored with the asset | |
| TObjectPtr< USoundAttenuation > | AttenuationSettings | Attenuation settings package for the sound | |
| uint8: 1 | bBypassVolumeScaleForPriority | Bypass volume weighting priority upon evaluating whether sound should remain active when max channel count is met (See platform Audio Settings). | |
| uint8: 1 | bDebug | When "au.3dVisualize.Attenuation" has been specified, draw this sound's attenuation shape when the sound is audible. | |
| uint8: 1 | bEnableBaseSubmix | If enabled, sound will route to the Master Submix by default or to the Base Submix if defined. | |
| uint8: 1 | bEnableBusSends | Whether or not to enable sending this audio's output to buses. | |
| uint8: 1 | bEnableSubmixSends | Whether or not to enable Submix Sends other than the Base Submix. | |
| uint8: 1 | bHasConcatenatorNode | Whether or not this sound has a concatenator node. | |
| uint8: 1 | bHasDelayNode | Whether or not this sound has a delay node | |
| uint8: 1 | bOverrideConcurrency | Whether or not to override the sound concurrency object with local concurrency settings. | |
| TArray< FSoundSourceBusSendInfo > | BusSends | This sound will send its audio output to this list of buses if there are bus instances playing after source effects are processed. | |
| FSoundConcurrencySettings | ConcurrencyOverrides | If Override Concurrency is true, concurrency settings to use. | |
| TSet< TObjectPtr< USoundConcurrency > > | ConcurrencySet | Set of concurrency settings to observe (if override is set to false). | |
| TMap< Audio::FDeviceId, int32 > | CurrentPlayCount | Map of device handle to number of times this sound is currently being played using that device(counted if sound is virtualized). | |
| float | Duration | Duration of sound in seconds. | |
| float | MaxDistance | The max distance of the asset, as determined by attenuation settings. | |
| TArray< FSoundSourceBusSendInfo > | PreEffectBusSends | This sound will send its audio output to this list of buses if there are bus instances playing before source effects are processed. | |
| float | Priority | 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). | |
| TObjectPtr< USoundClass > | SoundClassObject | Sound class this sound belongs to | |
| TObjectPtr< USoundSubmixBase > | SoundSubmixObject | Submix to route sound output to. | |
| TArray< FSoundSubmixSendInfo > | SoundSubmixSends | Array of submix sends to which a prescribed amount (see 'Send Level') of this sound is sent. | |
| TObjectPtr< USoundEffectSourcePresetChain > | SourceEffectChain | The source effect chain to use for this sound. | |
| float | TotalSamples | Total number of samples (in the thousands). | |
| EVirtualizationMode | VirtualizationMode | Virtualization behavior, determining if a sound may revive and how it continues playing when culled or evicted (limited to looping sounds). |
Constructors
| Type | Name | Description | |
|---|---|---|---|
USoundBase
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< Audio::IParameterTransmitter > | CreateParameterTransmitter
(
Audio::FParameterTransmitterInitParams&& InParams |
Creates a parameter transmitter for communicating with active sound instances. | |
| ISoundGeneratorPtr | CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams |
Creates a sound generator instance from this sound base. | |
| ISoundGeneratorPtr | CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams, |
Creates a sound generator instance from this sound base. | |
| bool | Whether or not this sound allows submix sends on preview. | ||
| bool | GetAllDefaultParameters
(
TArray< FAudioParameter >& OutParameters |
Gets all the default parameters for this Asset. | |
| const FSoundAttenuationSettings * | Returns a pointer to the attenuation settings that are to be applied for this node | ||
| void | GetConcurrencyHandles
(
TArray< FConcurrencyHandle >& OutConcurrencyHandles |
Returns an array of FSoundConcurrencySettings handles. | |
| UCurveTable * | GetCurveData () |
Returns curves associated with this sound if it has any. | |
| float | GetDuration () |
Returns the length of the sound | |
| float | Returns the farthest distance at which the sound could be heard | ||
| float | |||
| float | GetPriority () |
Returns the priority to use when evaluating concurrency. | |
| USoundClass * | Returns the SoundClass used for this sound. | ||
| void | GetSoundSourceBusSends
(
EBusSendType BusSendType, |
Returns the sound source sends for this sound. | |
| USoundSubmixBase * | Returns the SoundSubmix used for this sound. | ||
| void | GetSoundSubmixSends
(
TArray< FSoundSubmixSendInfo >& OutSends |
Returns the sound submix sends for this sound. | |
| 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. | |
| float | Returns the subtitle priority | ||
| TOptional< FSoundTimecodeOffset > | |||
| float | |||
| bool | Returns whether or not this sound base has an attenuation node. | ||
| bool | 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. | ||
| bool | |||
| bool | Queries if the sound has cooked FFT or envelope data. | ||
| 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. | |
| bool | ImplementsParameterInterface
(
Audio::FParameterInterfacePtr InParameterInterface |
Whether or not the given sound is a generator and implements an interface with the given name. | |
| void | InitParameters
(
TArray< FAudioParameter >& ParametersToInit, |
Called from the Game Thread prior to attempting to pass parameters to the ParameterTransmitter. | |
| void | Called from the Game Thread prior to attempting to initialize a sound instance. | ||
| bool | Only used as an edit condition for AttenuationSettings member, as base classes may choose to provide an attenuation override implementation | ||
| bool | IsLooping () |
Returns whether or not this sound is looping. | |
| bool | IsOneShot () |
Query if it's one shot. One shot is defined as a sound which is intended to have a fixed duration. | |
| bool | IsParameterValid
(
const FAudioParameter& InParameter |
Returns whether parameter is valid input for the given sound | |
| bool | IsPlayable () |
Returns whether the sound base is set up in a playable manner | |
| bool | Returns true if any of the sounds in the sound have "play when silent" enabled. | ||
| void | Parse
(
FAudioDevice* AudioDevice, |
Parses the Sound to generate the WaveInstances to play. | |
| void | SetTimecodeOffset
(
const FSoundTimecodeOffset& InTimecodeOffset |
||
| bool | Returns whether or not any part of this sound wants interior volumes applied to it | ||
| bool | Returns whether sound supports subtitles. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from UObjectBaseUtility
| Type | Name | Description | |
|---|---|---|---|
| bool | Called after load to determine if the object can be a cluster root | ||
| bool | Called during cluster construction if the object can be added to a cluster |
Overridden from IInterface_AssetUserData
| Type | Name | Description | |
|---|---|---|---|
| void | AddAssetUserData
(
UAssetUserData* InUserData |
||
| const TArray< UAssetUserData * > * | |||
| UAssetUserData * | GetAssetUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
||
| void | RemoveUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bHasVirtualizeWhenSilent_DEPRECATED | ||
| uint8: 1 | bOutputToBusOnly_DEPRECATED | Whether or not to only send this audio's output to a bus. | |
| int32 | MaxConcurrentPlayCount_DEPRECATED | Maximum number of times this sound can be played concurrently. | |
| TEnumAsByte< EMaxConcurrentResolutionRule::Type > | MaxConcurrentResolutionRule_DEPRECATED | ||
| TObjectPtr< USoundConcurrency > | SoundConcurrencySettings_DEPRECATED | If Override Concurrency is false, the sound concurrency settings to use for this sound. |