aboutsummaryrefslogtreecommitdiffstats
path: root/common/alcomplex.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-08 16:05:18 -0700
committerChris Robinson <[email protected]>2019-06-08 16:05:18 -0700
commitb6ce793f849c25cb9ddf992e2b647d3babcaf6cb (patch)
tree5241fc5d70d64d26f889f0c5f79c74d9b4f605d0 /common/alcomplex.h
parent1569b79c5d133717c4913cfde7cdbf0e7c64f270 (diff)
Use a span for the complex_fft/hilbert functions
Diffstat (limited to 'common/alcomplex.h')
-rw-r--r--common/alcomplex.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/alcomplex.h b/common/alcomplex.h
index 554886c4..f224cce2 100644
--- a/common/alcomplex.h
+++ b/common/alcomplex.h
@@ -3,22 +3,22 @@
#include <complex>
+#include "alspan.h"
+
/**
* Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is
- * FFT and 1 is iFFT (inverse). Fills FFTBuffer[0...FFTSize-1] with the
- * Discrete Fourier Transform (DFT) of the time domain data stored in
- * FFTBuffer[0...FFTSize-1]. FFTBuffer is an array of complex numbers, FFTSize
- * MUST BE power of two.
+ * FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier
+ * Transform (DFT) of the time domain data stored in the buffer. The buffer is
+ * an array of complex numbers, and MUST BE power of two.
*/
-void complex_fft(std::complex<double> *FFTBuffer, int FFTSize, double Sign);
+void complex_fft(const al::span<std::complex<double>> buffer, const double sign);
/**
* Calculate the complex helical sequence (discrete-time analytical signal) of
* the given input using the discrete Hilbert transform (In-place algorithm).
- * Fills Buffer[0...size-1] with the discrete-time analytical signal stored in
- * Buffer[0...size-1]. Buffer is an array of complex numbers, size MUST BE
- * power of two.
+ * Fills the buffer with the discrete-time analytical signal stored in the
+ * buffer. The buffer is an array of complex numbers and MUST BE power of two.
*/
-void complex_hilbert(std::complex<double> *Buffer, int size);
+void complex_hilbert(const al::span<std::complex<double>> buffer);
#endif /* ALCOMPLEX_H */