![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <BlockCorrelator.h>
Public Member Functions | |
| SIGNALPROCESSING_API | FBlockCorrelator (const FBlockCorrelatorSettings &InSettings) |
| SIGNALPROCESSING_API const FBlockCorrelatorSettings & | GetSettings () 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) |
Correlation calculator which utilizes FFT to perform fast correlation calculations.
| Audio::FBlockCorrelator::FBlockCorrelator | ( | const FBlockCorrelatorSettings & | InSettings | ) |
Construct a block correlator with FBlockCorrelatorSettings
| 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]]
| Input | - input block with GetNumInputValues() elements. |
| Output | - Output block with GetNumOutputValues() elements. |
| 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]]
| InputA | - First input block with GetNumInputValues() elements. |
| InputB | - Second input block with GetNumInputValues() elements. |
| Output | - Output block with GetNumOutputValues() elements. |
| int32 Audio::FBlockCorrelator::GetNumInputValues | ( | ) | const |
Returns the number of input values to use when calling CrossCorrelate(...) or AutoCorrelate(...)
| int32 Audio::FBlockCorrelator::GetNumOutputValues | ( | ) | const |
Returns the number of output values to use when calling CrossCorrelate(...) or AutoCorrelate(...)
| const FBlockCorrelatorSettings & Audio::FBlockCorrelator::GetSettings | ( | ) | const |
Return settings used to construct block correlator.