UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Audio::FBlockCorrelator Class Reference

#include <BlockCorrelator.h>

Public Member Functions

SIGNALPROCESSING_API FBlockCorrelator (const FBlockCorrelatorSettings &InSettings)
 
SIGNALPROCESSING_API const FBlockCorrelatorSettingsGetSettings () const
 
SIGNALPROCESSING_API int32 GetNumInputValues () const
 
SIGNALPROCESSING_API int32 GetNumOutputValues () const
 
SIGNALPROCESSING_API void CrossCorrelate (const FAlignedFloatBuffer &InputA, const FAlignedFloatBuffer &InputB, FAlignedFloatBuffer &Output)
 
SIGNALPROCESSING_API void AutoCorrelate (const FAlignedFloatBuffer &Input, FAlignedFloatBuffer &Output)
 

Detailed Description

Correlation calculator which utilizes FFT to perform fast correlation calculations.

Constructor & Destructor Documentation

◆ FBlockCorrelator()

Audio::FBlockCorrelator::FBlockCorrelator ( const FBlockCorrelatorSettings InSettings)

Construct a block correlator with FBlockCorrelatorSettings

Member Function Documentation

◆ AutoCorrelate()

void Audio::FBlockCorrelator::AutoCorrelate ( const FAlignedFloatBuffer Input,
FAlignedFloatBuffer Output 
)

Autocorrelate an input signal.

The Output array is filled with the autocorrelation of the Input. Care should be taken when interpreting the output as the elements are ordered so that the autocorrelation value of zero lag is in the first element.

AutoCorr[k] = Sum_n(Input[n] * Input[n + k])

Then for M = GetNumInputValues() the Output array contains: Output = [AutoCorr[0], AutoCorr[1], ..., AutoCorr[M-1], AutoCorr[M], AutoCorr[-M + 1], AutoCorr[-M + 2], ..., AutoCorr[-2], AutoCorr[-1]]

Parameters
Input- input block with GetNumInputValues() elements.
Output- Output block with GetNumOutputValues() elements.

◆ CrossCorrelate()

void Audio::FBlockCorrelator::CrossCorrelate ( const FAlignedFloatBuffer InputA,
const FAlignedFloatBuffer InputB,
FAlignedFloatBuffer Output 
)

Cross correlate two input signals.

The Output array is filled with the cross correlation between InputA and InputB. Care should be taken when interpreting the output as the elements are ordered so that the cross correlation value of zero lag is in the first element.

CrossCorr[k] = Sum_n(InputA[n] * InputB[n + k])

Then for M = GetNumInputValues() the Output array contains: Output = [CrossCorr[0], CrossCorr[1], ..., CrossCorr[M-1], CrossCorr[M], CrossCorr[-M + 1], CrossCorr[-M + 2], ..., CrossCorr[-2], CrossCorr[-1]]

Parameters
InputA- First input block with GetNumInputValues() elements.
InputB- Second input block with GetNumInputValues() elements.
Output- Output block with GetNumOutputValues() elements.

◆ GetNumInputValues()

int32 Audio::FBlockCorrelator::GetNumInputValues ( ) const

Returns the number of input values to use when calling CrossCorrelate(...) or AutoCorrelate(...)

◆ GetNumOutputValues()

int32 Audio::FBlockCorrelator::GetNumOutputValues ( ) const

Returns the number of output values to use when calling CrossCorrelate(...) or AutoCorrelate(...)

◆ GetSettings()

const FBlockCorrelatorSettings & Audio::FBlockCorrelator::GetSettings ( ) const

Return settings used to construct block correlator.


The documentation for this class was generated from the following files: