add queen mary DSP library
[ardour2.git] / libs / qm-dsp / dsp / signalconditioning / Filter.h
blobb0ff3dc9646b4873647f78dac60ada1b89da913d
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
3 /*
4 QM DSP Library
6 Centre for Digital Music, Queen Mary, University of London.
7 This file 2005-2006 Christian Landone.
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
16 #ifndef FILTER_H
17 #define FILTER_H
19 #ifndef NULL
20 #define NULL 0
21 #endif
23 struct FilterConfig{
24 unsigned int ord;
25 double* ACoeffs;
26 double* BCoeffs;
29 class Filter
31 public:
32 Filter( FilterConfig Config );
33 virtual ~Filter();
35 void reset();
37 void process( double *src, double *dst, unsigned int length );
40 private:
41 void initialise( FilterConfig Config );
42 void deInitialise();
44 unsigned int m_ord;
46 double* m_inBuffer;
47 double* m_outBuffer;
49 double* m_ACoeffs;
50 double* m_BCoeffs;
53 #endif