16#include <DMAChannel.h>
17#include <AnalogBufferDMA.h>
48 static void SamplerCallback(AnalogBufferDMA* dma_buffer_instance, int8_t adc_num);
Provides a base class for FFT-based microphone signal processing.
Base class for FFT-based microphone signal processing.
static float maxDB
Maximum decibel value for normalization.
static uint8_t pin
Pin number for microphone input.
static uint16_t sampleRate
Sampling rate in Hz.
static float minDB
Minimum decibel value for normalization.
Provides real-time FFT analysis of microphone signals.
static uint8_t gain_pin
Pin number for gain control (if applicable).
static void setMicGain(bool is50db)
Sets the microphone gain.
static void setSamplingRate(uint32_t sampleRate)
Sets the sampling rate for the microphone.
static void UpdateDMA()
Updates the DMA system to process new samples.
static const int16_t Hanning256[]
Hanning window coefficients for FFT.
static void Initialize(uint8_t pin, uint32_t sampleRate, float minDB, float maxDB)
Initializes the microphone and FFT system with basic parameters.
static void SamplerCallback()
Callback function for the sampling timer.
static void window_raw_fft_data(void *buffer, const void *window)
Applies a Hanning window to raw FFT data.
static bool microphoneGain_50db
Flag to enable or disable 50dB microphone gain.