FAlignedBlockBuffer

First In First Out Buffer designed for audio buffers.

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

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

Include

#include "DSP/AlignedBlockBuffer.h"

Syntax

class FAlignedBlockBuffer

Remarks

First In First Out Buffer designed for audio buffers. Generally performs best when buffers are greater than 16 samples, optimally for buffers between 256 to 4096 samples. Memory operations are designed for audio applications by ensuring memory allocations only occur in the constructor or when capacity is altered, memory freeing only happens in the destructor or when capacity is altered. All assignments are performed using block memory copies.

Constructors

Name Description

Public function

FAlignedBlockBuffer

(
    int32 InSampleCapacity,
    int32 InMaxNumInspectSamples,
    uint32 InByteAlignment,
    uint32 InAllocByteAlignment
)

Constructor.

Destructors

Name Description

Public function

~FAlignedBlockBuffer()

Destructor.

Functions

Name Description

Public function

void

 

AddSamples

(
    const float* InSamples,
    int32 InNum
)

Add samples to the buffer.

Public function

void

 

AddZeros

(
    int32 InNum
)

Add zeros to the buffer.

Protected function Const

float *

 

AllocateAlignedFloatArray

(
    int32 InNum
)

Public function

void

 

ClearSamples()

Clear entire buffer.

Protected function Const

void

 

CopyFloatArray

(
    float* ToArray,
    const float* FromArray,
    int32 InNum
)

Protected function Const

void

 

FreeFloatArray

(
    float*& Array
)

Public function Const

int32

 

GetMaxNumInspectSamples()

Maximum number of elements that can be inspected.

Public function Const

int32

 

GetNumAvailable()

Amount of samples left over in buffer.

Public function Const

int32

 

GetSampleCapacity()

Maximum size of buffer.

Public function

const float ...

 

InspectSamples

(
    int32 InNum,
    int32 InOffset
)

Inspect samples in the buffer.

Public function

void

 

RemoveSamples

(
    int32 InNum
)

Remove samples from the buffer.

Protected function

void

 

SetMaxNumInspectSamples

(
    int32 InMax
)

Set the maximum number of elements that can be inspected.

Protected function Const

void

 

ZeroFloatArray

(
    float* InArray,
    int32 InNum
)

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