c@225: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@225: c@225: /* c@225: QM DSP Library c@225: c@225: Centre for Digital Music, Queen Mary, University of London. c@225: This file copyright 2005-2006 Christian Landone. c@225: All rights reserved. c@225: */ c@225: c@225: #ifndef CDFPROCESS_H c@225: #define CDFPROCESS_H c@225: c@225: #include c@225: #include "FiltFilt.h" c@225: c@225: struct DFProcConfig{ c@225: unsigned int length; c@225: unsigned int LPOrd; c@225: double *LPACoeffs; c@225: double *LPBCoeffs; c@225: unsigned int winPre; c@225: unsigned int winPost; c@225: double AlphaNormParam; c@237: bool isMedianPositive; c@237: }; c@225: c@225: class DFProcess c@225: { c@225: public: c@225: DFProcess( DFProcConfig Config ); c@225: virtual ~DFProcess(); c@225: c@225: void process( double* src, double* dst ); c@225: c@225: c@225: private: c@225: void initialise( DFProcConfig Config ); c@225: void deInitialise(); c@225: void removeDCNormalize( double *src, double*dst ); c@225: void medianFilter( double* src, double* dst ); c@225: c@225: unsigned int m_length; c@225: unsigned int m_FFOrd; c@225: c@225: unsigned int m_winPre; c@225: unsigned int m_winPost; c@225: c@225: double m_alphaNormParam; c@225: c@225: double* filtSrc; c@225: double* filtDst; c@225: c@225: double* m_filtScratchIn; c@225: double* m_filtScratchOut; c@225: c@225: FiltFiltConfig m_FilterConfigParams; c@225: c@225: FiltFilt* m_FiltFilt; c@225: c@225: bool m_isMedianPositive; c@225: }; c@225: c@225: #endif