diff options
Diffstat (limited to 'common/alcomplex.h')
-rw-r--r-- | common/alcomplex.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/common/alcomplex.h b/common/alcomplex.h index 042a3232..f730ba9e 100644 --- a/common/alcomplex.h +++ b/common/alcomplex.h @@ -11,25 +11,23 @@ * FFT and 1 is inverse FFT. Applies the Discrete Fourier Transform (DFT) to * the data supplied in the buffer, which MUST BE power of two. */ -template<typename Real> -std::enable_if_t<std::is_floating_point<Real>::value> -complex_fft(const al::span<std::complex<Real>> buffer, const al::type_identity_t<Real> sign); +void complex_fft(const al::span<std::complex<double>> buffer, const double sign); /** * Calculate the frequency-domain response of the time-domain signal in the * provided buffer, which MUST BE power of two. */ -template<typename T, size_t N> -void forward_fft(const al::span<T,N> buffer) -{ complex_fft(al::span<T>{buffer}, -1); } +template<size_t N> +void forward_fft(const al::span<std::complex<double>,N> buffer) +{ complex_fft(al::span<std::complex<double>>{buffer}, -1.0); } /** * Calculate the time-domain signal of the frequency-domain response in the * provided buffer, which MUST BE power of two. */ -template<typename T, size_t N> -void inverse_fft(const al::span<T,N> buffer) -{ complex_fft(al::span<T>{buffer}, 1); } +template<size_t N> +void inverse_fft(const al::span<std::complex<double>,N> buffer) +{ complex_fft(al::span<std::complex<double>>{buffer}, +1.0); } /** * Calculate the complex helical sequence (discrete-time analytical signal) of |