mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Initial commit
added libraries: opus flac libsndfile updated: libvorbis libogg openal - Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
parent
05a083ca6f
commit
a745fc3757
1954 changed files with 431332 additions and 21037 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define ALCOMPLEX_H
|
||||
|
||||
#include <complex>
|
||||
#include <type_traits>
|
||||
|
||||
#include "alspan.h"
|
||||
|
||||
|
|
@ -10,21 +11,27 @@
|
|||
* 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.
|
||||
*/
|
||||
void complex_fft(const al::span<std::complex<double>> buffer, const double sign);
|
||||
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);
|
||||
|
||||
/**
|
||||
* Calculate the frequency-domain response of the time-domain signal in the
|
||||
* provided buffer, which MUST BE power of two.
|
||||
*/
|
||||
inline void forward_fft(const al::span<std::complex<double>> buffer)
|
||||
{ complex_fft(buffer, -1.0); }
|
||||
template<typename Real, size_t N>
|
||||
std::enable_if_t<std::is_floating_point<Real>::value>
|
||||
forward_fft(const al::span<std::complex<Real>,N> buffer)
|
||||
{ complex_fft(buffer.subspan(0), -1); }
|
||||
|
||||
/**
|
||||
* Calculate the time-domain signal of the frequency-domain response in the
|
||||
* provided buffer, which MUST BE power of two.
|
||||
*/
|
||||
inline void inverse_fft(const al::span<std::complex<double>> buffer)
|
||||
{ complex_fft(buffer, 1.0); }
|
||||
template<typename Real, size_t N>
|
||||
std::enable_if_t<std::is_floating_point<Real>::value>
|
||||
inverse_fft(const al::span<std::complex<Real>,N> buffer)
|
||||
{ complex_fft(buffer.subspan(0), 1); }
|
||||
|
||||
/**
|
||||
* Calculate the complex helical sequence (discrete-time analytical signal) of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue