/* FFT routine */ /* (c) 2025 cepstrum.co.jp */ /** ***/ /*** you can use better FFT routine (FFTW etc) ***/ /*** ***/ float cos_table[FFTLEN/2]; float sin_table[FFTLEN/2]; int rev_table1[FFTLEN/2]; int rev_table2[FFTLEN/2]; //---------------------------------------------- int ilog2(int x) { int i, j; i=x; j=0; do { j=j+1; i=i/2; } while (i!=1); return j; } //---------------------------------------------- void make_cos_sin_table(float cos_table[], float sin_table[], int len) { float cosine; int i; cos_table[0]=1.0; cos_table[len/4]=0.0; sin_table[0]=0.0; sin_table[len/4]=1.0; for (i=1; i