Module |
|
Header |
/Engine/Source/Runtime/SignalProcessing/Public/DSP/SpectrumAnalyzer.h |
Include |
#include "DSP/SpectrumAnalyzer.h" |
class FSpectrumAnalyzer
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().
Name | Description | |
---|---|---|
|
FSpectrumAnalyzer() |
If an instance is created using the default constructor, Init() must be called before it is used. |
|
FSpectrumAnalyzer ( |
If an instance is created using either of these constructors, Init() is not neccessary. |
|
FSpectrumAnalyzer ( |
Name | Description | |
---|---|---|
|
~FSpectrumAnalyzer() |
Name | Description | ||
---|---|---|---|
|
GetBands ( |
Return array of bands using spectrum band extractor. |
|
|
float |
GetMagnitudeForFrequency ( |
Samples magnitude (linearly) for a given frequency, in Hz. |
|
float |
GetNormalizedMagnitudeForFrequency ( |
|
|
float |
GetPhaseForFrequency ( |
Samples phase for a given frequency, in Hz. |
|
GetSettings ( |
Get the current settings used by this Spectrum Analyzer. |
|
|
Init ( |
Initialize sample rate of analyzer if not known at time of construction. |
|
|
Init ( |
Initialize sample rate of analyzer if not known at time of construction. |
|
|
IsInitialized() |
Returns false if this instance of FSpectrumAnalyzer was constructed with the default constructor and Init() has not been called yet. |
|
|
LockOutputBuffer() |
You can call this function to ensure that you're sampling the same window of frequency data, Then call UnlockOutputBuffer when you're done. |
|
|
PerformAnalysisIfPossible ( |
Thread safe call to perform actual FFT. |
|
|
PushAudio ( |
Push audio to queue. Returns false if the queue is already full. |
|
|
PushAudio ( |
Push audio to queue. Returns false if the queue is already full. |
|
|
SetSettings ( |
Update the settings used by this Spectrum Analyzer. Safe to call on any thread, but should not be called every tick. |
|
|
UnlockOutputBuffer() |
Name |
Description |
|
---|---|---|
|
EPeakInterpolationMethod |
Peak interpolation method. |