Navigation
API > API/Runtime > API/Runtime/Engine
Structure encapsulating all information required to play a USoundWave on a channel/source. This is required as a single USoundWave object can be used in multiple active cues or multiple times in the same cue.
| Name | FWaveInstance |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Audio.h |
| Include Path | #include "Audio.h" |
Syntax
struct FWaveInstance
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWaveInstance
(
FWaveInstance&& |
Audio.h | ||
FWaveInstance
(
const UPTRINT InWaveInstanceHash, |
Constructor, initializing all member variables.Constructor, initializing all member variables. | Audio.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PlayOrderCounter | uint32 | Static helper to create good unique type hashes | Audio.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AbsoluteAzimuth | float | The absolute position of the wave instance relative to forward vector of listener. | Audio.h | |
| ActiveSound | FActiveSound * | Active Sound this wave instance belongs to | Audio.h | |
| AmbientZoneFilterFrequency | float | The low pass filter frequency to use due to ambient zones. | Audio.h | |
| AttenuationDistance | float | Distance over which the sound is attenuated. | Audio.h | |
| AttenuationHighpassFilterFrequency | float | The high pass filter frequency to use due to distance attenuation. (using in audio mixer only) | Audio.h | |
| AttenuationLowpassFilterFrequency | float | The low pass filter frequency to use due to distance attenuation. | Audio.h | |
| AttenuationSubmixSends | TArray< FAttenuationSubmixSendSettings > | The submix send settings to use. | Audio.h | |
| AudioLinkSettingsOverride | UAudioLinkSettingsAbstract * | Audio.h | ||
| bAlreadyNotifiedHook | uint32 | Whether the notify finished hook has been called since the last update/parsenodes | Audio.h | |
| bApplyRadioFilter | uint32 | Set to true if the sound nodes state that the radio filter should be applied | Audio.h | |
| bCenterChannelOnly | uint32 | Whether or not this sound class forces sounds to the center channel | Audio.h | |
| bEnableBaseSubmix | uint32 | Whether or not to render to the main submix | Audio.h | |
| bEnableBusSends | uint32 | Whether or not to enable sending this audio's output to buses. | Audio.h | |
| bEnableHighPassFilter | uint32 | Whether or not to enable the high pass filter | Audio.h | |
| bEnableLowPassFilter | uint32 | Whether or not to enable the low pass filter | Audio.h | |
| bEnableSourceDataOverride | uint32 | Whether or not to use source data overrides | Audio.h | |
| bEnableSubmixSends | uint32 | Whether or not to enable Submix Sends in addition to the Main Submix | Audio.h | |
| bIsAmbisonics | uint32 | Whether or not this wave instance is ambisonics. | Audio.h | |
| bIsDynamic | uint32 | Is this or any of the submixes above it dynamic | Audio.h | |
| bIsFinished | uint32 | Whether wave instanced is finished | Audio.h | |
| bIsMusic | uint32 | Whether or not this wave is music | Audio.h | |
| bIsOccluded | uint32 | Whether or not the sound is occluded. | Audio.h | |
| bIsPaused | uint32 | Whether or not this sound is manually paused | Audio.h | |
| bIsStarted | uint32 | Whether wave instanced has been started | Audio.h | |
| bIsStopping | uint32 | Whether or not this wave instance is stopping. | Audio.h | |
| bIsUISound | uint32 | Whether or not this sound plays when the game is paused in the UI | Audio.h | |
| bReportedSpatializationWarning | uint32 | Prevent spamming of spatialization of surround sounds by tracking if the warning has already been emitted | Audio.h | |
| bReverb | uint32 | Whether or not this wave has reverb applied | Audio.h | |
| bShouldSourceBufferListenerZeroBuffer | bool | Audio.h | ||
| bShouldUseAudioLink | bool | AudioLink Opt in | Audio.h | |
| bSpatializationIsExternalSend | uint32 | Whether the spatialization method is an external send | Audio.h | |
| BusSends | TArray< FSoundSourceBusSendInfo > | The source bus and/or audio bus sends. | Audio.h | |
| EnvelopeFollowerAttackTime | int32 | The envelope follower attack time in milliseconds. | Audio.h | |
| EnvelopeFollowerReleaseTime | int32 | The envelope follower release time in milliseconds. | Audio.h | |
| HighPassFilterFrequency | float | The high pass filter frequency to use | Audio.h | |
| LFEBleed | float | The amount of a sound to bleed to the LFE channel | Audio.h | |
| ListenerToSoundDistance | float | The distance from this wave instance to the closest listener. | Audio.h | |
| ListenerToSoundDistanceForPanning | float | The distance from this wave instance to the closest listener. (ignoring attenuation override) | Audio.h | |
| Location | FVector | Current location | Audio.h | |
| LoopingMode | ELoopingMode | Looping mode - None, loop with notification, forever | Audio.h | |
| LowPassFilterFrequency | float | The low pass filter frequency to use | Audio.h | |
| ManualReverbSendLevel | float | TODO remove | Audio.h | |
| NonSpatializedRadiusEnd | float | At what distance we are fully non-spatialized | Audio.h | |
| NonSpatializedRadiusMode | ENonSpatializedRadiusSpeakerMapMode | How we are doing the non-spatialized radius feature. | Audio.h | |
| NonSpatializedRadiusStart | float | At what distance we start transforming into non-spatialized soundsource | Audio.h | |
| NotifyBufferFinishedHooks | FNotifyBufferFinishedHooks | Sound nodes to notify when the current audio buffer finishes | Audio.h | |
| OcclusionFilterFrequency | float | The low pass filter frequency to use if the sound is occluded. | Audio.h | |
| OcclusionPluginSettings | UOcclusionPluginSourceSettingsBase * | The occlusion plugin settings to use for the wave instance. | Audio.h | |
| OutputTarget | EAudioOutputTarget::Type | Which output target the sound should play on. | Audio.h | |
| Pitch | float | Current pitch scale. | Audio.h | |
| PlaybackPercent | float | The linear percentage of the Wave which has been played based on its duration. | Audio.h | |
| PlaybackTime | float | The playback time of the wave instance. Updated from active sound. | Audio.h | |
| Priority | float | An audio component priority value that scales with volume (post all gain stages) and is used to determine voice playback priority. | Audio.h | |
| QuantizedRequestData | TUniquePtr< Audio::FQuartzQuantizedRequestData > | Quantized Request data | Audio.h | |
| RadioFilterVolume | float | Volume of the radio filter effect | Audio.h | |
| RadioFilterVolumeThreshold | float | The volume at which the radio filter kicks in | Audio.h | |
| ReverbPluginSettings | UReverbPluginSourceSettingsBase * | The occlusion plugin settings to use for the wave instance. | Audio.h | |
| ReverbSendLevel | float | The output reverb send level to use for tje wave instance. | Audio.h | |
| SoundClass | TObjectPtr< USoundClass > | Sound class | Audio.h | |
| SoundClassFilterFrequency | float | The low pass filter frequency to use from sound class. | Audio.h | |
| SoundSubmix | USoundSubmixBase * | Sound submix object to send audio to for mixing in audio mixer. | Audio.h | |
| SoundSubmixSends | TArray< FSoundSubmixSendInfo > | Sound submix sends | Audio.h | |
| SourceBufferListener | FSharedISourceBufferListenerPtr | Source Buffer listener | Audio.h | |
| SourceDataOverridePluginSettings | USourceDataOverridePluginSourceSettingsBase * | The source data override plugin settings to use for the wave instance. | Audio.h | |
| SourceEffectChain | USoundEffectSourcePresetChain * | Sound effect chain | Audio.h | |
| SpatializationMethod | ESoundSpatializationAlgorithm | Which spatialization method to use to spatialize 3d sounds. | Audio.h | |
| SpatializationPluginSettings | USpatializationPluginSourceSettingsBase * | The occlusion plugin settings to use for the wave instance. | Audio.h | |
| StartTime | float | An offset/seek time to play this wave instance. | Audio.h | |
| StereoSpread | float | Amount of spread for 3d multi-channel asset spatialization | Audio.h | |
| UserIndex | uint8 | User / Controller index that owns the sound | Audio.h | |
| VoiceCenterChannelVolume | float | Voice center channel volume | Audio.h | |
| WaveData | TObjectPtr< USoundWave > | Wave data | Audio.h | |
| WaveInstanceHash | UPTRINT | Hash value for finding the wave instance based on the path through the cue to get to it | Audio.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bUseSpatialization | uint32 | Whether to use spatialization | Audio.h | |
| DistanceAttenuation | float | Volume attenuation due to distance. | Audio.h | |
| EnvelopValue | float | The current envelope value of the wave instance. | Audio.h | |
| OcclusionAttenuation | float | Volume attenuation due to occlusion. | Audio.h | |
| PlayOrder | uint32 | Cached play order | Audio.h | |
| RelativeRenderCost | float | The estimated relative render cost of the wave instance. | Audio.h | |
| Volume | float | Current volume | Audio.h | |
| VolumeMultiplier | float | Current volume multiplier - used to zero the volume without stopping the source | Audio.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector |
Function used by the GC. | Audio.h | |
float GetActualVolume() |
Returns the actual volume the wave instance will play at, including all gain stages. | Audio.h | |
float GetDistanceAndOcclusionAttenuation() |
Returns the combined distance and occlusion attenuation of the source voice. | Audio.h | |
float GetDistanceAttenuation() |
Returns the distance attenuation of the source voice | Audio.h | |
float GetDynamicVolume() |
Returns the dynamic volume of the sound | Audio.h | |
FSoundModulationDestinationSettings GetEffectiveModulationSettings
(
const EModulationDestination InDestination |
Audio.h | ||
float GetEffectiveModulationValue
(
const EModulationDestination InDestination |
Audio.h | ||
float GetEnvelopeValue () |
Gets the envelope value of the waveinstance. | Audio.h | |
FString GetName() |
Returns the name of the contained USoundWave | Audio.h | |
float GetOcclusionAttenuation() |
Returns the occlusion attenuation of the source voice | Audio.h | |
float GetPitch() |
Returns the pitch of the wave instance | Audio.h | |
uint32 GetPlayOrder() |
Audio.h | ||
float GetRelativeRenderCost() |
Retrieves the relative render cost of wave instance. | Audio.h | |
bool GetSpatializationIsExternalSend() |
Whether spatialization is an external send | Audio.h | |
bool GetUseSpatialization() |
Whether this wave will be spatialized, which controls 3D effects like panning | Audio.h | |
float GetVolume() |
Returns the volume of the wave instance (ignoring application muting) | Audio.h | |
float GetVolumeMultiplier() |
Returns the volume multiplier on the wave instance. | Audio.h | |
float GetVolumeWeightedPriority() |
Returns the weighted priority of the wave instance. | Audio.h | |
float GetVolumeWithDistanceAndOcclusionAttenuation() |
Returns the volume of the sound including distance attenuation. | Audio.h | |
bool IsPlaying() |
Returns whether or not the WaveInstance is actively playing sound or set to play when silent. | Audio.h | |
bool IsSeekable() |
Audio.h | ||
bool IsStopping() |
Audio.h | ||
bool IsStreaming() |
Checks whether wave is streaming and streaming is supported | Audio.h | |
void NotifyFinished
(
const bool bStopped |
Notifies the wave instance that the current playback buffer has finished. | Audio.h | |
void SetDistanceAttenuation
(
const float InDistanceAttenuation |
Audio.h | ||
void SetEnvelopeValue
(
const float InEnvelopeValue |
Sets the envelope value of the wave instance. | Audio.h | |
void SetOcclusionAttenuation
(
const float InOcclusionAttenuation |
Audio.h | ||
void SetPitch
(
const float InPitch |
Audio.h | ||
void SetRelativeRenderCost
(
float InRelativeRenderCost |
Sets the relative render cost of the wave instance. | Audio.h | |
void SetSpatializationIsExternalSend
(
const bool InSpatializationIsExternalSend |
Whether spatialization is an external send | Audio.h | |
void SetStopping
(
const bool bInIsStopping |
Audio.h | ||
void SetUseSpatialization
(
const bool InUseSpatialization |
Whether to use spatialization, which controls 3D effects like panning | Audio.h | |
void SetVolume
(
const float InVolume |
Setters for various values on wave instances. | Audio.h | |
void SetVolumeMultiplier
(
const float InVolumeMultiplier |
Audio.h | ||
bool ShouldStopDueToMaxConcurrency() |
Returns the actual volume the wave instance will play at | Audio.h | |
void StopWithoutNotification () |
Stops the wave instance without notifying NotifyWaveInstanceFinishedHook. | Audio.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static Audio::FModulationParameter GetParameterBasedOnDestination
(
const EModulationDestination InDestination |
Audio.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWaveInstance & operator=
(
FWaveInstance&& |
Audio.h |