cannam@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@0: cannam@0: /* cannam@0: QM DSP Library cannam@0: cannam@0: Centre for Digital Music, Queen Mary, University of London. Chris@84: This file 2005-2006 Christian Landone. Chris@84: Chris@84: This program is free software; you can redistribute it and/or Chris@84: modify it under the terms of the GNU General Public License as Chris@84: published by the Free Software Foundation; either version 2 of the Chris@84: License, or (at your option) any later version. See the file Chris@84: COPYING included with this distribution for more information. cannam@0: */ cannam@0: cannam@0: #ifndef FILTFILT_H cannam@0: #define FILTFILT_H cannam@0: cannam@0: #include "Filter.h" cannam@0: Chris@153: /** Chris@153: * Zero-phase digital filter, implemented by processing the data Chris@153: * through a filter specified by the given FilterConfig structure (see Chris@153: * Filter) and then processing it again in reverse. Chris@153: */ cannam@0: class FiltFilt cannam@0: { cannam@0: public: Chris@153: FiltFilt( FilterConfig Config ); cannam@0: virtual ~FiltFilt(); cannam@0: cannam@0: void reset(); cannam@0: void process( double* src, double* dst, unsigned int length ); cannam@0: cannam@0: private: Chris@153: void initialise( FilterConfig Config ); cannam@0: void deInitialise(); cannam@0: cannam@0: unsigned int m_ord; cannam@0: cannam@0: Filter* m_filter; cannam@0: cannam@0: double* m_filtScratchIn; cannam@0: double* m_filtScratchOut; cannam@0: cannam@0: FilterConfig m_filterConfig; cannam@0: }; cannam@0: cannam@0: #endif