Navigation
API > API/Runtime > API/Runtime/SignalProcessing
SpectrumAnalyzer for computing spectrum in async task.
| Name | FAsyncSpectrumAnalyzer |
| Type | class |
| Header File | /Engine/Source/Runtime/SignalProcessing/Public/DSP/SpectrumAnalyzer.h |
| Include Path | #include "DSP/SpectrumAnalyzer.h" |
Syntax
class FAsyncSpectrumAnalyzer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAsyncSpectrumAnalyzer
(
const FSpectrumAnalyzerSettings& InSettings, |
DSP/SpectrumAnalyzer.h | ||
FAsyncSpectrumAnalyzer
(
float InSampleRate |
If an instance is created using either of these constructors, Init() is not neccessary. | DSP/SpectrumAnalyzer.h | |
| DSP/SpectrumAnalyzer.h | |||
FAsyncSpectrumAnalyzer
(
const FSpectrumAnalyzer& |
DSP/SpectrumAnalyzer.h | ||
| DSP/SpectrumAnalyzer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAsyncSpectrumAnalyzer() |
DSP/SpectrumAnalyzer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Analyzer | TSharedRef< FSpectrumAnalyzer, ESPMode::ThreadSafe > | DSP/SpectrumAnalyzer.h | ||
| AsyncAnalysisTask | TUniquePtr< FSpectrumAnalyzerTask > | This is used if PerformAsyncAnalysisIfPossible is called. | DSP/SpectrumAnalyzer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetBands
(
ISpectrumBandExtractor& InExtractor, |
Return array of bands using spectrum band extractor. | DSP/SpectrumAnalyzer.h | |
float GetMagnitudeForFrequency
(
float InFrequency, |
Samples magnitude (linearly) for a given frequency, in Hz. | DSP/SpectrumAnalyzer.h | |
float GetNormalizedMagnitudeForFrequency
(
float InFrequency, |
DSP/SpectrumAnalyzer.h | ||
float GetPhaseForFrequency
(
float InFrequency, |
Samples phase for a given frequency, in Hz. | DSP/SpectrumAnalyzer.h | |
void GetSettings
(
FSpectrumAnalyzerSettings& OutSettings |
Get the current settings used by this Spectrum Analyzer. | DSP/SpectrumAnalyzer.h | |
void Init
(
const FSpectrumAnalyzerSettings& InSettings, |
DSP/SpectrumAnalyzer.h | ||
void Init
(
float InSampleRate |
Initialize sample rate of analyzer if not known at time of construction. | DSP/SpectrumAnalyzer.h | |
bool IsInitialized() |
Returns false if this instance of FSpectrumAnalyzer was constructed with the default constructor and Init() has not been called yet. | DSP/SpectrumAnalyzer.h | |
void 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. | DSP/SpectrumAnalyzer.h | |
bool PerformAnalysisIfPossible
(
bool bUseLatestAudio |
Thread safe call to perform actual FFT. | DSP/SpectrumAnalyzer.h | |
bool PerformAsyncAnalysisIfPossible
(
bool bUseLatestAudio |
Thread safe call to perform actual FFT. | DSP/SpectrumAnalyzer.h | |
bool PushAudio
(
const float* InBuffer, |
DSP/SpectrumAnalyzer.h | ||
bool PushAudio
(
const TSampleBuffer< float >& InBuffer |
Push audio to queue. Returns false if the queue is already full. | DSP/SpectrumAnalyzer.h | |
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. | DSP/SpectrumAnalyzer.h | |
void UnlockOutputBuffer() |
DSP/SpectrumAnalyzer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| DSP/SpectrumAnalyzer.h | |||
FAsyncSpectrumAnalyzer & operator=
(
const FSpectrumAnalyzer& |
DSP/SpectrumAnalyzer.h |