ref: 57925bf5928fa13f946bb039dbe5c64196cf6a9d
parent: 14dbf095ff7d84c114eab8f48a699047516a5ff6
author: rrt <rrt>
date: Tue Nov 14 16:00:31 EST 2006
Make input arrays const
--- a/src/FFT.c
+++ b/src/FFT.c
@@ -121,7 +121,7 @@
void FFT(int NumSamples,
int InverseTransform,
- float *RealIn, float *ImagIn, float *RealOut, float *ImagOut)
+ const float *RealIn, float *ImagIn, float *RealOut, float *ImagOut)
{
int NumBits; /* Number of bits needed to store indices */
int i, j, k, n;
@@ -229,7 +229,7 @@
* i4 <-> imag[n/2-i]
*/
-void RealFFT(int NumSamples, float *RealIn, float *RealOut, float *ImagOut)
+void RealFFT(int NumSamples, const float *RealIn, float *RealOut, float *ImagOut)
{
int Half = NumSamples / 2;
int i;
@@ -294,7 +294,7 @@
* of its code.
*/
-void PowerSpectrum(int NumSamples, float *In, float *Out)
+void PowerSpectrum(int NumSamples, const float *In, float *Out)
{
int Half, i, i3;
float theta, wtemp, wpr, wpi, wr, wi;
--- a/src/FFT.h
+++ b/src/FFT.h
@@ -59,7 +59,7 @@
* input array, and that NumSamples must be a power of two.
*/
-void PowerSpectrum(int NumSamples, float *In, float *Out);
+void PowerSpectrum(int NumSamples, const float *In, float *Out);
/*
* Computes an FFT when the input data is real but you still
@@ -69,7 +69,7 @@
*/
void RealFFT(int NumSamples,
- float *RealIn, float *RealOut, float *ImagOut);
+ const float *RealIn, float *RealOut, float *ImagOut);
/*
* Computes a FFT of complex input and returns complex output.
@@ -79,7 +79,7 @@
void FFT(int NumSamples,
int InverseTransform,
- float *RealIn, float *ImagIn, float *RealOut, float *ImagOut);
+ const float *RealIn, float *ImagIn, float *RealOut, float *ImagOut);
/*
* Applies a windowing function to the data in place