Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Sound
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USoundBase
- USoundCue
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Sound/SoundCue.h |
| Include | #include "Sound/SoundCue.h" |
Syntax
UCLASS (HideCategories=object, BlueprintType, Meta=(LoadBehavior="LazyOnDemand"), MinimalAPI)
class USoundCue : public USoundBase
Remarks
The behavior of audio playback is defined within Sound Cues.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TObjectPtr< USoundNode > > | AllNodes | ||
| FSoundAttenuationSettings | AttenuationOverrides | Attenuation settings to use if Override Attenuation is set to true | |
| uint8: 1 | bExcludeFromRandomNodeBranchCulling | Ignore per-platform random node culling for memory purposes | |
| uint8: 1 | bOverrideAttenuation | Indicates whether attenuation should use the Attenuation Overrides or the Attenuation Settings asset | |
| uint8: 1 | bPrimeOnLoad | Makes this sound cue automatically load any sound waves it can play into the cache when it is loaded. | |
| TObjectPtr< USoundNode > | FirstNode | ||
| float | PitchMultiplier | Base pitch multiplier | |
| TObjectPtr< UEdGraph > | SoundCueGraph | ||
| float | SubtitlePriority | NOTE: Use GetSubtitlePriority() to fetch this value for external use. | |
| float | VolumeMultiplier | Base volume multiplier |
Constructors
| Type | Name | Description | |
|---|---|---|---|
USoundCue
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
UObject* InThis, |
||
| void | Call to cache any values which need to be computed from the sound cue graph. | ||
| void | CacheLoadingBehavior
(
ESoundWaveLoadingBehavior InBehavior |
Call this when stream caching is enabled to update sound waves of loading behavior they are inheriting via SoundCue | |
| void | This is used to cache the quality level if it has not been cached yet. | ||
| void | ClearGraph () |
Clears all nodes from the graph (for old editor's buffer soundcue) | |
| void | Use the EdGraph representation to compile the SoundCue | ||
| T * | ConstructSoundNode
(
TSubclassOf< USoundNode > SoundNodeClass, |
Construct and initialize a node within this Cue | |
| void | CreateGraph () |
Create the basic sound graph | |
| float | EvaluateMaxAttenuation
(
const FTransform& Origin, |
For SoundCues, use this instead of GetAttenuationSettingsToApply() -> Evaluate | |
| bool | FindPathToNode
(
const UPTRINT NodeHashToFind, |
Find the path through the sound cue to a node identified by its hash | |
| int32 | |||
| int32 | Set the Quality level that the Cue was cooked at, called by the SoundQualityNodes | ||
| UEdGraph * | GetGraph () |
Get the EdGraph of SoundNodes | |
| int32 | GetResourceSizeForFormat
(
FName Format |
||
| TSharedPtr< ISoundCueAudioEditor > | Gets the sound cue graph editor implementation. | ||
| void | Use the SoundCue's children to link EdGraph Nodes together | ||
| void | Call this when stream caching is enabled to prime all SoundWave assets referenced by this Sound Cue. | ||
| void | RecursiveFindAllNodes
(
USoundNode* Node, |
Recursively finds all Nodes in the Tree | |
| void | RecursiveFindAttenuation
(
const USoundNode* Node, |
||
| void | RecursiveFindAttenuation
(
USoundNode* Node, |
||
| void | RecursiveFindNode
(
const USoundNode* Node, |
||
| void | RecursiveFindNode
(
USoundNode* Node, |
Recursively finds sound nodes of type T | |
| bool | RecursiveFindPathToNode
(
USoundNode* CurrentNode, |
||
| void | |||
| void | ResetGraph () |
Resets all graph data and nodes | |
| void | Call this when stream caching is enabled to retain all soundwave assets referenced by this sound cue. | ||
| void | SetSoundCueAudioEditor
(
TSharedPtr< ISoundCueAudioEditor > InSoundCueGraphEditor |
Sets the sound cue graph editor implementation.* | |
| void | SetupSoundNode
(
USoundNode* InSoundNode, |
Set up EdGraph parts of a SoundNode | |
| void | StaticAudioQualityChanged
(
int32 NewQualityLevel |
Call when the audio quality has been changed |
Overridden from USoundBase
| Type | Name | Description | |
|---|---|---|---|
| float | |||
| TSharedPtr< Audio::IParameterTransmitter > | CreateParameterTransmitter
(
Audio::FParameterTransmitterInitParams&& InParams |
Creates a parameter transmitter for communicating with active sound instances. | |
| const FSoundAttenuationSettings * | Returns a pointer to the attenuation settings that are to be applied for this node | ||
| float | GetDuration () |
Returns the length of the sound | |
| float | Returns the farthest distance at which the sound could be heard | ||
| float | |||
| 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 | ||
| float | |||
| bool | |||
| bool | Queries if the sound has cooked FFT or envelope data. | ||
| bool | Only used as an edit condition for AttenuationSettings member, as base classes may choose to provide an attenuation override implementation | ||
| 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. | |
| bool | Returns whether or not any part of this sound wants interior volumes applied to it |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| FString | GetDesc () |
Return a one line description of an object for viewing in the thumbnail view of the generic browser | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Serialize
(
FStructuredArchive::FRecord Record |
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 |
Constants
| Name | Description |
|---|---|
| CachedQualityLevel | |
| SoundCueAudioEditor | Ptr to interface to sound cue editor operations. |