UAudioGenerator

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

AudioMixer

Header

/Engine/Source/Runtime/AudioMixer/Classes/Generators/AudioGenerator.h

Include

#include "Generators/AudioGenerator.h"

Syntax

class UAudioGenerator : public UObject

Variables

Name Description

Protected variable

FCriticalSectio...

 

CritSect

Protected variable

int32

 

NumChannels

Protected variable

TMap< uint32, F...

 

OnGeneratedMap

Protected variable

int32

 

SampleRate

Constructors

Name Description

Public function

UAudioGenerator()

Destructors

Name Description

Public function Virtual

~UAudioGenerator()

Functions

Name Description

Public function

FAudioGenera...

 

AddGeneratorDelegate

(
    FOnAudioGenerate InFunction
)

Adds a generator delegate. Returns a handle for the generator delegate, so it can be removed.

Public function Const

int32

 

GetNumChannels()

Returns the number of channels of the generator.

Public function Const

int32

 

GetSampleRate()

Returns the sample rate of the generator.

Protected function

void

 

Init

(
    int32 InSampleRate,
    int32 InNumChannels
)

Called by derived classes to initialize the sample rate and num channels of the generator.

Protected function

void

 

OnGeneratedAudio

(
    const float* InAudio,
    int32 NumSamples
)

Called by derived classes when new audio is generated.

Public function

void

 

RemoveGeneratorDelegate

(
    FAudioGeneratorHandle InHandle
)

Removes the given audio generator delegate handle.