qm-dsp  1.8
Filter.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     QM DSP Library
00005 
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file 2005-2006 Christian Landone.
00008 
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef FILTER_H
00017 #define FILTER_H
00018 
00019 #ifndef NULL
00020 #define NULL 0
00021 #endif
00022 
00029 struct FilterConfig{
00030     unsigned int ord;
00031     double* ACoeffs;
00032     double* BCoeffs;
00033 };
00034 
00038 class Filter  
00039 {
00040 public:
00041     Filter( FilterConfig Config );
00042     virtual ~Filter();
00043 
00044     void reset();
00045 
00046     void process( double *src, double *dst, unsigned int length );
00047 
00048 private:
00049     void initialise( FilterConfig Config );
00050     void deInitialise();
00051 
00052     unsigned int m_ord;
00053 
00054     double* m_inBuffer;
00055     double* m_outBuffer;
00056 
00057     double* m_ACoeffs;
00058     double* m_BCoeffs;
00059 };
00060 
00061 #endif