USynthComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AudioMixer

Header

/Engine/Source/Runtime/AudioMixer/Public/Components/SynthComponent.h

Include

#include "Components/SynthComponent.h"

Syntax

class USynthComponent : public USceneComponent

Variables

Name Description

Public variable

FSoundAttenuati...

 

AttenuationOverrides

If bOverrideSettings is true, the attenuation properties to use for sounds generated by this component

Public variable

USoundAttenuati...

 

AttenuationSettings

If bOverrideSettings is false, the asset to use to determine attenuation properties for sounds generated by this component

Public variable

uint8: 1

 

bAllowSpatialization

Is this audio component allowed to be spatialized?

Public variable

uint8: 1

 

bAlwaysPlay

Whether to artificially prioritize the component to play

Public variable

uint8: 1

 

bAutoDestroy

Auto destroy this component on completion

Public variable

uint8: 1

 

bIsPreviewSound

Whether or not this synth is playing as a preview sound

Public variable

uint8: 1

 

bIsUISound

Whether or not this sound plays when the game is paused in the UI

Public variable

uint32: 1

 

bOutputToBusOnly

Whether or not to only send this audio's output to a bus.

Public variable

uint8: 1

 

bOverrideAttenuation

Should the Attenuation Settings asset be used (false) or should the properties set directly on the component be used for attenuation properties

Public variable

uint8: 1

 

bStopWhenOwnerDestroyed

Stop sound when owner is destroyed

Public variable

TArray< FSoundS...

 

BusSends

This sound will send its audio output to this list of buses if there are bus instances playing after source effects are processed.

Public variable

TSet< USoundCon...

 

ConcurrencySet

What sound concurrency to use for sounds generated by this audio component

Public variable

int32

 

EnvelopeFollowerAttackTime

The attack time in milliseconds for the envelope follower.

Public variable

int32

 

EnvelopeFollowerReleaseTime

The release time in milliseconds for the envelope follower.

Public variable

FSoundModulatio...

 

Modulation

Modulation for the sound

Protected variable

int32

 

NumChannels

Can be set by the derived class, defaults to 2.

Public variable

FOnSynthEnvelop...

 

OnAudioEnvelopeValue

Public variable

FOnSynthEnvelop...

 

OnAudioEnvelopeValueNative

Shadow delegate for non UObject subscribers

Public variable

TArray< FSoundS...

 

PreEffectBusSends

This sound will send its audio output to this list of buses if there are bus instances playing before source effects are processed.

Protected variable

int32

 

PreferredBufferLength

Can be set by the derived class- sets the preferred callback size for the synth component.

Public variable

USoundClass ...

 

SoundClass

Sound class this sound belongs to

Public variable

USoundSubmixBas...

 

SoundSubmix

Submix this sound belongs to

Public variable

TArray< FSoundS...

 

SoundSubmixSends

An array of submix sends. Audio from this sound will send a portion of its audio to these effects.

Public variable

USoundEffectSou...

 

SourceEffectChain

The source effect chain to use for this sound.

Constructors

Name Description

Public function

USynthComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddAudioBufferListener

(
    IAudioBufferListener* InAudioB...
)

Adds and removes audio buffer listener.

Public function

void

 

CreateAudioComponent()

Creates the audio component if it hasn't already been created yet.

Public function

UAudioCompon...

 

GetAudioComponent()

Retrieves this synth component's audio component.

Protected function

FAudioDevice...

 

GetAudioDevice()

Gets the audio device associated with this synth component.

Protected function Virtual

bool

 

Init

(
    int32& SampleRate
)

Called when synth is created.

Public function

void

 

Initialize

(
    int32 SampleRateOverride
)

Call if creating this synth component not via an actor component in BP, but in code or some other location.

Public function Const

bool

 

IsPlaying()

Returns true if this component is currently playing.

Public function

void

 

OnAudioComponentEnvelopeValue

(
    const UAudioComponent* AudioCo...,
    const USoundWave* SoundWave,
    const float EnvelopeValue
)

Protected function Virtual

void

 

OnBeginGenerate()

Called when the synth component begins generating audio in render thread.

Protected function Virtual

void

 

OnEndGenerate()

Called when the synth has finished generating audio on the render thread.

Protected function Virtual

int32

 

OnGenerateAudio

(
    float* OutAudio,
    int32 NumSamples
)

Called when more audio is needed to be generated.

Protected function

int32

 

OnGeneratePCMAudio

(
    float* GeneratedPCMData,
    int32 NumSamples
)

Called by procedural sound wave Returns the number of samples actually generated

Protected function Virtual

void

 

OnStart()

Called when synth is about to start playing.

Protected function Virtual

void

 

OnStop()

Called when synth is about to stop playing.

Public function

void

 

RemoveAudioBufferListener

(
    IAudioBufferListener* InAudioB...
)

Public function

void

 

SetSubmixSend

(
    USoundSubmixBase* Submix,
    float SendLevel
)

Sets how much audio the sound should send to the given submix.

Public function

void

 

SetVolumeMultiplier

(
    float VolumeMultiplier
)

Sets how much audio the sound should send to the given submix.

Public function

void

 

Start()

Starts the synth generating audio.

Public function

void

 

Stop()

Stops the synth generating audio.

Protected function

void

 

SynthCommand

(
    TFunction< void()> Command
)

Method to execute parameter changes on game thread in audio render thread.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

Activate

(
    bool bReset
)

Activates the SceneComponent, should be overridden by native child classes.

Public function Virtual

void

 

Deactivate()

Deactivates the SceneComponent.

Public function Virtual Const

bool

 

IsReadyForOwnerToAutoDestroy()

Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Enums

Name

Description

Private enum

ESynthEvent

Deprecated Variables

Name Description

Public variable

USoundConcurren...

 

ConcurrencySettings_DEPRECATED

What sound concurrency to use for sounds generated by this audio component

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss