2012-07-13 21:18:35 +02:00
|
|
|
/*
|
|
|
|
* 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);
|
2012-09-03 17:16:14 +02:00
|
|
|
void complex_to_absolute(value_type *re, value_type *im, value_type *result);
|
2012-07-13 21:18:35 +02:00
|
|
|
void apply_hanning(sample *dftinput);
|
2012-09-03 17:16:14 +02:00
|
|
|
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);
|
2012-07-13 21:18:35 +02:00
|
|
|
|
|
|
|
#endif // FFT_H
|