FDelay

Circular Buffer Delay Line.

Windows
MacOS
Linux

Inheritance Hierarchy

FDelay

FDelayAPF

References

Module

SignalProcessing

Header

/Engine/Source/Runtime/SignalProcessing/Public/DSP/Delay.h

Include

#include "DSP/Delay.h"

Syntax

class FDelay

Remarks

Circular Buffer Delay Line.

Variables

Name Description

Protected variable

float *

 

AudioBuffer

Pointer to the circular buffer of audio.

Protected variable

int32

 

AudioBufferSize

Max length of buffer (in samples)

Protected variable

float

 

DelayInSamples

Delay in samples; float supports fractional delay.

Protected variable

FExponentialEas...

 

EaseDelayMsec

Eased delay in msec.

Protected variable

float

 

OutputAttenuation

Output attenuation value.

Protected variable

float

 

OutputAttenuationDB

Attenuation in decibel.

Protected variable

int32

 

ReadIndex

Read index for circular buffer.

Protected variable

float

 

SampleRate

Sample rate.

Protected variable

int32

 

WriteIndex

Write index for circular buffer.

Constructors

Name Description

Public function

FDelay()

Constructor.

Destructors

Name Description

Public function Virtual

~FDelay()

Virtual Destructor.

Functions

Name Description

Public function Const

float

 

GetDelayLengthSamples()

Returns the current delay line length (in samples).

Public function

void

 

Init

(
    const float InSampleRate,
    const float InBufferLengthSec
)

Initialization of the delay with given sample rate and max buffer size in samples.

Public function Virtual

float

 

ProcessAudioSample

(
    const float InAudio
)

Process audio in the delay line, return the delayed value.

Public function Const

float

 

Read()

Reads the delay line at current read index without writing or incrementing read/write pointers.

Public function Const

float

 

ReadDelayAt

(
    const float InReadMsec
)

Reads the delay line at an arbitrary time in Msec without writing or incrementing read/write pointers.

Public function

void

 

Reset()

Resets the delay line state, flushes buffer and resets read/write pointers.

Public function

void

 

SetDelayMsec

(
    const float InDelayMsec
)

Sets the delay line length. Will clamp to within range of the max initialized delay line length (won't resize).

Public function

void

 

SetDelaySamples

(
    const float InDelaySamples
)

Same as SetDelayMsec, except in samples.

Public function

void

 

SetEasedDelayMsec

(
    const float InDelayMsec,
    const bool bIsInit
)

Sets the delay line length but using the internal easing function for smooth delay line interpolation.

Public function

void

 

SetEaseFactor

(
    const float InEaseFactor
)

Sets the easing factor for the delay line's internal exponential interpolator.

Public function

void

 

SetOutputAttenuationDB

(
    const float InDelayAttenDB
)

Sets the output attenuation in DB.

Protected function

void

 

Update

(
    bool bForce
)

Updates delay line based on any recent changes to settings.

Public function

void

 

WriteDelayAndInc

(
    const float InDelayInput
)

Write the input and increment read/write pointers.

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