Navigation
Unreal Engine C++ API Reference > Runtime > SignalProcessing > DSP
References
Module | SignalProcessing |
Header | /Engine/Source/Runtime/SignalProcessing/Public/DSP/SpectrumAnalyzer.h |
Include | #include "DSP/SpectrumAnalyzer.h" |
Syntax
class FSpectrumAnalyzer
Remarks
Class built to be a rolling spectrum analyzer for arbitrary, monaural audio data. Class is meant to scale accuracy with CPU and memory budgets. Typical usage is to either call PushAudio() and then PerformAnalysisIfPossible immediately afterwards, or have a seperate thread call PerformAnalysisIfPossible().
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
If an instance is created using the default constructor, Init() must be called before it is used. | ||
![]() |
FSpectrumAnalyzer
(
float InSampleRate |
If an instance is created using either of these constructors, Init() is not neccessary. | |
![]() |
FSpectrumAnalyzer
(
const FSpectrumAnalyzerSettings& InSettings, |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | GetBands
(
ISpectrumBandExtractor& InExtractor, |
Return array of bands using spectrum band extractor. |
![]() |
float | GetMagnitudeForFrequency
(
float InFrequency, |
Samples magnitude (linearly) for a given frequency, in Hz. |
![]() |
float | GetNormalizedMagnitudeForFrequency
(
float InFrequency, |
|
![]() |
float | GetPhaseForFrequency
(
float InFrequency, |
Samples phase for a given frequency, in Hz. |
![]() |
void | GetSettings
(
FSpectrumAnalyzerSettings& OutSettings |
Get the current settings used by this Spectrum Analyzer. |
![]() |
void | Init
(
const FSpectrumAnalyzerSettings& InSettings, |
Initialize sample rate of analyzer if not known at time of construction. |
![]() |
void | Init
(
float InSampleRate |
Initialize sample rate of analyzer if not known at time of construction. |
![]() |
bool | Returns false if this instance of FSpectrumAnalyzer was constructed with the default constructor and Init() has not been called yet. | |
![]() |
void | You can call this function to ensure that you're sampling the same window of frequency data, Then call UnlockOutputBuffer when you're done. | |
![]() |
bool | PerformAnalysisIfPossible
(
bool bUseLatestAudio |
Thread safe call to perform actual FFT. |
![]() |
bool | PushAudio
(
const TSampleBuffer< float >& InBuffer |
Push audio to queue. Returns false if the queue is already full. |
![]() |
bool | PushAudio
(
const float* InBuffer, |
Push audio to queue. Returns false if the queue is already full. |
![]() |
void | SetSettings
(
const FSpectrumAnalyzerSettings& InSettings |
Update the settings used by this Spectrum Analyzer. Safe to call on any thread, but should not be called every tick. |
![]() |
void |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
EPeakInterpolationMethod | Peak interpolation method. |