23 lines
759 B
C
23 lines
759 B
C
/*
|
|
* vim: sw=2 ts=2 expandtab
|
|
*
|
|
* THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
|
|
* <cfr34k@tkolb.de> wrote this file. As long as you retain this notice you can
|
|
* do whatever you want with this stuff. If we meet some day, and you think
|
|
* this stuff is worth it, you can buy me a pizza in return. - Thomas Kolb
|
|
*/
|
|
|
|
#ifndef FFT_H
|
|
#define FFT_H
|
|
|
|
#include "config.h"
|
|
|
|
void init_fft(void);
|
|
void complex_to_absolute(value_type *re, value_type *im, value_type *result);
|
|
void apply_hanning(sample *dftinput);
|
|
void fft_transform(sample *samples, value_type *resultRe, value_type *resultIm);
|
|
uint32_t find_loudest_frequency(value_type *absFFT);
|
|
value_type get_energy_in_band(value_type *fft, uint32_t minFreq, uint32_t maxFreq);
|
|
|
|
#endif // FFT_H
|