Make a couple more functions private
[openal-soft.git] / common / alcomplex.h
blob12b86436a73fca13664958753e5cc2ba7b32736c
1 #ifndef ALCOMPLEX_H
2 #define ALCOMPLEX_H
4 #include <complex>
6 #include "alspan.h"
8 /**
9 * Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is
10 * FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier
11 * Transform (DFT) of the time domain data stored in the buffer. The buffer is
12 * an array of complex numbers, and MUST BE power of two.
14 void complex_fft(const al::span<std::complex<double>> buffer, const double sign);
16 /**
17 * Calculate the complex helical sequence (discrete-time analytical signal) of
18 * the given input using the discrete Hilbert transform (In-place algorithm).
19 * Fills the buffer with the discrete-time analytical signal stored in the
20 * buffer. The buffer is an array of complex numbers and MUST BE power of two,
21 * and the imaginary components should be cleared to 0.
23 void complex_hilbert(const al::span<std::complex<double>> buffer);
25 #endif /* ALCOMPLEX_H */