Perform inverse FFT, returning real data Accepts: input_re - pointer to an array of the real part of the output, size nfft/2 + 1 input_im - pointer to an array of the imaginary part of the output, size nfft/2 + 1 output - pointer to an array of (real) input values, size nfft
| 77 | // size nfft/2 + 1 |
| 78 | // output - pointer to an array of (real) input values, size nfft |
| 79 | void FFT::Inverse(float* input_re, float* input_im, float* output) |
| 80 | { |
| 81 | int hnfft; |
| 82 | |
| 83 | hnfft = mNfft / 2; |
| 84 | |
| 85 | for (int ti = 0; ti < hnfft; ti++) |
| 86 | { |
| 87 | mFft_data[ti] = input_re[ti]; |
| 88 | mFft_data[mNfft - 1 - ti] = input_im[ti]; |
| 89 | } |
| 90 | mFft_data[hnfft] = input_re[hnfft]; |
| 91 | |
| 92 | mayer_realifft(mNfft, mFft_data); |
| 93 | |
| 94 | for (int ti = 0; ti < mNfft; ti++) |
| 95 | { |
| 96 | output[ti] = mFft_data[ti]; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | |
| 101 | /* This is the FFT routine taken from PureData, a great piece of |
no test coverage detected