diff options
author | Chris Robinson <[email protected]> | 2018-11-17 04:14:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-17 04:14:57 -0800 |
commit | ccdaca80c910047e16f710d44f640a6d6f86a195 (patch) | |
tree | 0cf95ed7a5fd6478c01cea8bd8e9c521478ccf0d /common/alcomplex.h | |
parent | 09943683b5872943cd1f9211ef2a77922906b906 (diff) |
Use standard complex types instead of custom
Diffstat (limited to 'common/alcomplex.h')
-rw-r--r-- | common/alcomplex.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/common/alcomplex.h b/common/alcomplex.h index 0070ac13..554886c4 100644 --- a/common/alcomplex.h +++ b/common/alcomplex.h @@ -1,17 +1,7 @@ #ifndef ALCOMPLEX_H #define ALCOMPLEX_H -#include "AL/al.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ALcomplex { - ALdouble Real; - ALdouble Imag; -} ALcomplex; +#include <complex> /** * Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is @@ -20,7 +10,7 @@ typedef struct ALcomplex { * FFTBuffer[0...FFTSize-1]. FFTBuffer is an array of complex numbers, FFTSize * MUST BE power of two. */ -void complex_fft(ALcomplex *FFTBuffer, ALsizei FFTSize, ALdouble Sign); +void complex_fft(std::complex<double> *FFTBuffer, int FFTSize, double Sign); /** * Calculate the complex helical sequence (discrete-time analytical signal) of @@ -29,10 +19,6 @@ void complex_fft(ALcomplex *FFTBuffer, ALsizei FFTSize, ALdouble Sign); * Buffer[0...size-1]. Buffer is an array of complex numbers, size MUST BE * power of two. */ -void complex_hilbert(ALcomplex *Buffer, ALsizei size); - -#ifdef __cplusplus -} // extern "C" -#endif +void complex_hilbert(std::complex<double> *Buffer, int size); #endif /* ALCOMPLEX_H */ |