My bad
, it's true that I re-arrange the input samples when calling the dataToComplex function.
The "original" input samples should be in the x buffer.
I changed the printfs in the code, everything should be clear now, see attached zip.
- input samples
- complex & bit reversed input
- FFT output (-> complex & amplitude + phase)
- iFFT output (-> complex & amplitude + phase)
PS: The phases are kind of messed up, not really sure why though. For X(1) and X(2) they're correct, but it's calculating a phase of -90° at X(0)...