Navigation
API > API/Runtime > API/Runtime/Engine
The behavior of audio playback is defined within Sound Cues.
| Name | USoundCue |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Sound/SoundCue.h |
| Include Path | #include "Sound/SoundCue.h" |
Syntax
UCLASS (HideCategories=object, BlueprintType, Meta=(LoadBehavior="LazyOnDemand"), MinimalAPI)
class USoundCue : public USoundBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USoundBase → USoundCue
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USoundCue
(
const FObjectInitializer& ObjectInitializer |
Sound/SoundCue.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CachedQualityLevel | int32 | Sound/SoundCue.h | |
| SoundCueAudioEditor | TSharedPtr< ISoundCueAudioEditor > | Ptr to interface to sound cue editor operations. | Sound/SoundCue.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllNodes | TArray< TObjectPtr< USoundNode > > | Sound/SoundCue.h | ||
| AttenuationOverrides | FSoundAttenuationSettings | Attenuation settings to use if Override Attenuation is set to true | Sound/SoundCue.h |
|
| bExcludeFromRandomNodeBranchCulling | uint8 | Ignore per-platform random node culling for memory purposes | Sound/SoundCue.h |
|
| bOverrideAttenuation | uint8 | Indicates whether attenuation should use the Attenuation Overrides or the Attenuation Settings asset | Sound/SoundCue.h |
|
| bPrimeOnLoad | uint8 | Makes this sound cue automatically load any sound waves it can play into the cache when it is loaded. | Sound/SoundCue.h |
|
| FirstNode | TObjectPtr< USoundNode > | Sound/SoundCue.h |
|
|
| PitchMultiplier | float | Base pitch multiplier | Sound/SoundCue.h |
|
| SoundCueGraph | TObjectPtr< UEdGraph > | Sound/SoundCue.h | ||
| VolumeMultiplier | float | Base volume multiplier | Sound/SoundCue.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasAttenuationNode | uint8 | Sound/SoundCue.h | ||
| bHasAttenuationNodeInitialized | uint8 | Sound/SoundCue.h | ||
| bHasPlayWhenSilent | uint8 | Whether a sound has play when silent enabled (i.e. for a sound cue, if any sound wave player has it enabled). | Sound/SoundCue.h | |
| bIsRetainingAudio | uint8 | Sound/SoundCue.h | ||
| bShouldApplyInteriorVolumes | uint8 | Sound/SoundCue.h | ||
| bShouldApplyInteriorVolumesCached | uint8 | Sound/SoundCue.h | ||
| CookedQualityIndex | int32 | Sound/SoundCue.h | ||
| EditorOnlyCs | FCriticalSection | Sound/SoundCue.h | ||
| MaxAudibleDistance | float | Sound/SoundCue.h | ||
| OnPostEngineInitHandle | FDelegateHandle | Sound/SoundCue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CacheAggregateValues () |
Call to cache any values which need to be computed from the sound cue graph. | Sound/SoundCue.h | |
void CacheLoadingBehavior
(
ESoundWaveLoadingBehavior InBehavior |
Call this when stream caching is enabled to update sound waves of loading behavior they are inheriting via SoundCue | Sound/SoundCue.h | |
void ClearGraph() |
Clears all nodes from the graph (for old editor's buffer soundcue) | Sound/SoundCue.h | |
void CompileSoundNodesFromGraphNodes() |
Use the EdGraph representation to compile the SoundCue | Sound/SoundCue.h | |
T * ConstructSoundNode
(
TSubclassOf< USoundNode > SoundNodeClass, |
Construct and initialize a node within this Cue | Sound/SoundCue.h | |
void CreateGraph() |
Create the basic sound graph | Sound/SoundCue.h | |
float EvaluateMaxAttenuation
(
const FTransform& Origin, |
For SoundCues, use this instead of GetAttenuationSettingsToApply() -> Evaluate | Sound/SoundCue.h | |
bool FindPathToNode
(
const UPTRINT NodeHashToFind, |
Find the path through the sound cue to a node identified by its hash | Sound/SoundCue.h | |
int32 GetCookedQualityIndex() |
Set the Quality level that the Cue was cooked at, called by the SoundQualityNodes | Sound/SoundCue.h | |
UEdGraph * GetGraph() |
Get the EdGraph of SoundNodes | Sound/SoundCue.h | |
virtual int32 GetResourceSizeForFormat
(
FName Format |
Sound/SoundCue.h | ||
void LinkGraphNodesFromSoundNodes() |
Use the SoundCue's children to link EdGraph Nodes together | Sound/SoundCue.h | |
void PrimeSoundCue() |
Call this when stream caching is enabled to prime all SoundWave assets referenced by this Sound Cue. | Sound/SoundCue.h | |
void RecursiveFindAllNodes
(
USoundNode* Node, |
Recursively finds all Nodes in the Tree | Sound/SoundCue.h | |
void RecursiveFindAttenuation
(
const USoundNode* Node, |
Sound/SoundCue.h | ||
void RecursiveFindAttenuation
(
USoundNode* Node, |
Sound/SoundCue.h | ||
void RecursiveFindNode
(
const USoundNode* Node, |
Sound/SoundCue.h | ||
void RecursiveFindNode
(
USoundNode* Node, |
Recursively finds sound nodes of type T | Sound/SoundCue.h | |
void ReleaseRetainedAudio() |
Sound/SoundCue.h | ||
void ResetGraph() |
Resets all graph data and nodes | Sound/SoundCue.h | |
void RetainSoundCue() |
Call this when stream caching is enabled to retain all soundwave assets referenced by this sound cue. | Sound/SoundCue.h | |
void SetupSoundNode
(
USoundNode* InSoundNode, |
Set up EdGraph parts of a SoundNode | Sound/SoundCue.h |
Overridden from USoundBase
| 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/SoundCue.h | |
virtual const FSoundAttenuationSettings * GetAttenuationSettingsToApply() |
Returns a pointer to the attenuation settings that are to be applied for this node | Sound/SoundCue.h | |
virtual float GetDuration() |
Returns the length of the sound | Sound/SoundCue.h | |
virtual float GetMaxDistance() |
Returns the farthest distance at which the sound could be heard | Sound/SoundCue.h | |
virtual float GetPitchMultiplier() |
Sound/SoundCue.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/SoundCue.h | |
virtual float GetSubtitlePriority() |
Returns the subtitle priority | Sound/SoundCue.h | |
virtual float GetVolumeMultiplier() |
Sound/SoundCue.h | ||
virtual bool HasCookedAmplitudeEnvelopeData() |
Sound/SoundCue.h | ||
virtual bool HasCookedFFTData() |
Queries if the sound has cooked FFT or envelope data. | Sound/SoundCue.h | |
virtual bool IsAttenuationSettingsEditable () |
Whether or not this sound allows submix sends on preview. | Sound/SoundCue.h | |
virtual bool IsPlayable() |
Returns whether the sound base is set up in a playable manner | Sound/SoundCue.h | |
virtual bool IsPlayWhenSilent() |
Returns true if any of the sounds in the sound have "play when silent" enabled. | Sound/SoundCue.h | |
virtual void Parse
(
FAudioDevice* AudioDevice, |
Parses the Sound to generate the WaveInstances to play. | Sound/SoundCue.h | |
virtual bool ShouldApplyInteriorVolumes() |
Returns whether or not any part of this sound wants interior volumes applied to it | Sound/SoundCue.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Sound/SoundCue.h | ||
virtual FString GetDesc() |
Sound/SoundCue.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Sound/SoundCue.h | ||
virtual void PostInitProperties() |
Sound/SoundCue.h | ||
virtual void PostLoad() |
Sound/SoundCue.h | ||
virtual void Serialize
(
FStructuredArchive::FRecord Record |
Sound/SoundCue.h |
Overridden from UObjectBaseUtility
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeClusterRoot() |
Sound/SoundCue.h | ||
virtual bool CanBeInCluster() |
Sound/SoundCue.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool RecursiveFindPathToNode
(
USoundNode* CurrentNode, |
Sound/SoundCue.h |
Overridden from USoundBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual float ComputeMaxDistance() |
Sound/SoundCue.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Sound/SoundCue.h | ||
static void CacheQualityLevel() |
This is used to cache the quality level if it has not been cached yet. | Sound/SoundCue.h | |
static int32 GetCachedQualityLevel() |
Sound/SoundCue.h | ||
static TSharedPtr< ISoundCueAudioEditor > GetSoundCueAudioEditor() |
Gets the sound cue graph editor implementation. | Sound/SoundCue.h | |
static void SetSoundCueAudioEditor
(
TSharedPtr< ISoundCueAudioEditor > InSoundCueGraphEditor |
Sets the sound cue graph editor implementation.* | Sound/SoundCue.h | |
static void StaticAudioQualityChanged
(
int32 NewQualityLevel |
Call when the audio quality has been changed | Sound/SoundCue.h |