diff FIRFilter.cpp @ 12:d58409ecd720

* Merging Chris' changes
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Wed, 13 Aug 2014 10:47:39 +0100
parents 17a260410116
children 7680cc4c0073
line wrap: on
line diff
--- a/FIRFilter.cpp	Wed Aug 13 10:45:46 2014 +0100
+++ b/FIRFilter.cpp	Wed Aug 13 10:47:39 2014 +0100
@@ -14,16 +14,16 @@
 FIRFilter::FIRFilter(const unsigned int lengthInput, const unsigned int numberOfCoefficients) :
     m_lengthInput(lengthInput),
     m_numberOfCoefficients(numberOfCoefficients),
-    fftInput(NULL),
-    fftCoefficients(NULL),
-    fftReal1(NULL),
-    fftImag1(NULL),
-    fftReal2(NULL),
-    fftImag2(NULL),
-    fftFilteredReal(NULL),
-    fftFilteredImag(NULL),
-    fftOutputReal(NULL),
-    fftOutputImag(NULL)
+    fftInput(0),
+    fftCoefficients(0),
+    fftReal1(0),
+    fftImag1(0),
+    fftReal2(0),
+    fftImag2(0),
+    fftFilteredReal(0),
+    fftFilteredImag(0),
+    fftOutputReal(0),
+    fftOutputImag(0)
 {
     initialise();
 }
@@ -65,8 +65,8 @@
         fftCoefficients[i] = i < m_numberOfCoefficients ? coefficients[i] : 0.0;
     }
     
-    FFT::forward(m_lengthFIRFFT, fftInput, NULL, fftReal1, fftImag1);
-    FFT::forward(m_lengthFIRFFT, fftCoefficients, NULL, fftReal2, fftImag2);
+    FFT::forward(m_lengthFIRFFT, fftInput, 0, fftReal1, fftImag1);
+    FFT::forward(m_lengthFIRFFT, fftCoefficients, 0, fftReal2, fftImag2);
     
     //Multiply FFT coefficients. Multiplication in freq domain is convolution in time domain.
     for (int i = 0; i < m_lengthFIRFFT; i++){
@@ -95,5 +95,5 @@
     delete []fftFilteredImag;
     delete []fftOutputReal;
     delete []fftOutputImag;
-    fftInput = fftCoefficients = fftReal1 = fftImag1 = fftReal2 = fftImag2 = fftFilteredReal = fftFilteredImag = fftOutputReal = fftOutputImag = NULL;
-}
\ No newline at end of file
+    fftInput = fftCoefficients = fftReal1 = fftImag1 = fftReal2 = fftImag2 = fftFilteredReal = fftFilteredImag = fftOutputReal = fftOutputImag = 0;
+}