Mercurial > hg > qm-dsp
comparison dsp/signalconditioning/Filter.h @ 153:715f779d0b4f
Some docs; remove FiltFiltConfig as it's the same as FilterConfig
author | Chris Cannam |
---|---|
date | Mon, 21 Oct 2013 11:59:57 +0100 |
parents | e5907ae6de17 |
children | ca658c7215a9 |
comparison
equal
deleted
inserted
replaced
152:0d3b3c66652b | 153:715f779d0b4f |
---|---|
18 | 18 |
19 #ifndef NULL | 19 #ifndef NULL |
20 #define NULL 0 | 20 #define NULL 0 |
21 #endif | 21 #endif |
22 | 22 |
23 /** | |
24 * Filter specification. For a filter of order ord, the ACoeffs and | |
25 * BCoeffs arrays must point to ord+1 values each. ACoeffs provides | |
26 * the denominator and BCoeffs the numerator coefficients of the | |
27 * filter. | |
28 */ | |
23 struct FilterConfig{ | 29 struct FilterConfig{ |
24 unsigned int ord; | 30 unsigned int ord; |
25 double* ACoeffs; | 31 double* ACoeffs; |
26 double* BCoeffs; | 32 double* BCoeffs; |
27 }; | 33 }; |
28 | 34 |
35 /** | |
36 * Digital filter specified through FilterConfig structure. | |
37 */ | |
29 class Filter | 38 class Filter |
30 { | 39 { |
31 public: | 40 public: |
32 Filter( FilterConfig Config ); | 41 Filter( FilterConfig Config ); |
33 virtual ~Filter(); | 42 virtual ~Filter(); |
34 | 43 |
35 void reset(); | 44 void reset(); |
36 | 45 |
37 void process( double *src, double *dst, unsigned int length ); | 46 void process( double *src, double *dst, unsigned int length ); |
38 | |
39 | 47 |
40 private: | 48 private: |
41 void initialise( FilterConfig Config ); | 49 void initialise( FilterConfig Config ); |
42 void deInitialise(); | 50 void deInitialise(); |
43 | 51 |