I think line 41 of fft.c is wrong: (for(z = 0; z < 30; z++) ) should be for(z = 0; z < N; z++) , doesn't it?