optimointeja ja vanha fft takas
This commit is contained in:
14
src/fft.h
14
src/fft.h
@ -3,16 +3,6 @@
|
||||
#include <math.h>
|
||||
|
||||
#define FFT_SIZE 2048
|
||||
// Simple complex number struct
|
||||
struct Complex {
|
||||
float re, im;
|
||||
Complex(float r = 0, float i = 0) : re(r), im(i) {}
|
||||
Complex operator+(const Complex& o) const { return { re + o.re, im + o.im }; }
|
||||
Complex operator-(const Complex& o) const { return { re - o.re, im - o.im }; }
|
||||
Complex operator*(const Complex& o) const {
|
||||
return { re * o.re - im * o.im, re * o.im + im * o.re };
|
||||
}
|
||||
};
|
||||
|
||||
void fft(Complex* x, int N, Complex* buffer);
|
||||
void init_hamming_window();
|
||||
void compute_fft(float* time_data, float* freq_out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user