FastLED 3.9.15
Loading...
Searching...
No Matches
fl::audio::Context Class Reference

Detailed Description

Definition at line 20 of file audio_context.h.

#include <audio_context.h>

+ Collaboration diagram for fl::audio::Context:

Classes

struct  FFTCacheEntry
 

Public Member Functions

 Context (const Sample &sample) FL_NOEXCEPT
 
 ~Context () FL_NOEXCEPT
 
void clearCache () FL_NOEXCEPT
 
BandEnergy getBandEnergy () FL_NOEXCEPT
 
shared_ptr< const fft::BinsgetFFT (int bands=16, float fmin=fft::Args::DefaultMinFrequency(), float fmax=fft::Args::DefaultMaxFrequency(), fft::Mode mode=fft::Mode::AUTO, fft::Window window=fft::Window::BLACKMAN_HARRIS) FL_NOEXCEPT
 
shared_ptr< const fft::BinsgetFFT16 (fft::Mode mode=fft::Mode::LOG_REBIN, fft::Window window=fft::Window::BLACKMAN_HARRIS) FL_NOEXCEPT
 
const vector< fft::Bins > & getFFTHistory () const FL_NOEXCEPT
 
const fft::BinsgetHistoricalFFT (int framesBack) const FL_NOEXCEPT
 
span< const i16 > getPCM () const FL_NOEXCEPT
 
float getRMS () const FL_NOEXCEPT
 
const SamplegetSample () const FL_NOEXCEPT
 
int getSampleRate () const FL_NOEXCEPT
 
u32 getTimestamp () const FL_NOEXCEPT
 
float getZCF () const FL_NOEXCEPT
 
bool hasFFT () const FL_NOEXCEPT
 
bool hasFFTHistory () const FL_NOEXCEPT
 
bool isSilent () const FL_NOEXCEPT
 
void setFFTHistoryDepth (int depth) FL_NOEXCEPT
 
void setSample (const Sample &sample) FL_NOEXCEPT
 
void setSampleRate (int sampleRate) FL_NOEXCEPT
 
void setSilent (bool silent) FL_NOEXCEPT
 

Static Private Member Functions

static fl::size hashFFTArgs (const fft::Args &args) FL_NOEXCEPT
 

Private Attributes

fft::FFT mFFT
 
vector< FFTCacheEntrymFFTCache
 
flat_map< fl::size, int > mFFTCacheMap
 
vector< fft::BinsmFFTHistory
 
int mFFTHistoryDepth = 0
 
int mFFTHistoryIndex = 0
 
bool mIsSilent = false
 
vector< shared_ptr< fft::Bins > > mRecyclePool
 
Sample mSample
 
int mSampleRate = 44100
 

Static Private Attributes

static constexpr int MAX_FFT_CACHE_ENTRIES = 4
 

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