Mercurial > hg > vamp-tempogram
annotate FIRFilter.h @ 12:d58409ecd720
* Merging Chris' changes
author | Carl Bussey <c.bussey@se10.qmul.ac.uk> |
---|---|
date | Wed, 13 Aug 2014 10:47:39 +0100 |
parents | be59b4a73f49 |
children | 7680cc4c0073 |
rev | line source |
---|---|
c@0 | 1 // |
c@0 | 2 // FIRFilter.h |
c@0 | 3 // Tempogram |
c@0 | 4 // |
c@0 | 5 // Created by Carl Bussey on 25/06/2014. |
c@0 | 6 // Copyright (c) 2014 Carl Bussey. All rights reserved. |
c@0 | 7 // |
c@0 | 8 |
c@0 | 9 #ifndef __Tempogram__FIRFilter__ |
c@0 | 10 #define __Tempogram__FIRFilter__ |
c@0 | 11 |
c@7 | 12 #include <cmath> |
c@7 | 13 #include <vamp-sdk/FFT.h> |
c@7 | 14 #include <assert.h> |
c@7 | 15 |
c@0 | 16 class FIRFilter{ |
c@0 | 17 public: |
c@0 | 18 FIRFilter(const unsigned int lengthInput, const unsigned int numberOfCoefficients); |
c@0 | 19 ~FIRFilter(); |
c@0 | 20 void process(const float *input, const float *coefficients, float *output); |
c@0 | 21 private: |
c@8 | 22 unsigned int m_lengthInput; |
c@8 | 23 unsigned int m_numberOfCoefficients; |
c@8 | 24 unsigned int m_lengthFIRFFT; |
c@0 | 25 |
c@0 | 26 double *fftInput; |
c@0 | 27 double *fftCoefficients; |
c@0 | 28 double *fftReal1; |
c@0 | 29 double *fftImag1; |
c@0 | 30 double *fftReal2; |
c@0 | 31 double *fftImag2; |
c@0 | 32 double *fftFilteredReal; |
c@0 | 33 double *fftFilteredImag; |
c@0 | 34 double *fftOutputReal; |
c@0 | 35 double *fftOutputImag; |
c@0 | 36 |
c@0 | 37 void initialise(); |
c@0 | 38 void cleanup(); |
c@0 | 39 }; |
c@0 | 40 |
c@0 | 41 #endif /* defined(__Tempogram__FIRFilter__) */ |