Mercurial > hg > tipic
view src/Filter.h @ 32:83e5bd7fb921
Rate calculation into PitchFilterbank class
author | Chris Cannam |
---|---|
date | Wed, 30 Sep 2015 14:18:41 +0100 |
parents | 00df792783e3 |
children | 156d560d3470 |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #ifndef FILTER_H #define FILTER_H #include <bqvec/Restrict.h> #include <vector> class Filter { public: struct Parameters { std::vector<double> a; std::vector<double> b; }; Filter(Parameters params); ~Filter(); void reset(); /** * Filter the input sequence \arg in of length \arg n samples, and * write the resulting \arg n samples into \arg out. There must be * enough room in \arg out for \arg n samples to be written. */ void process(const double *const BQ_R__ in, double *const BQ_R__ out, const int n); private: int m_order; int m_sz; double *m_a; double *m_b; double *m_bufa; double *m_bufb; int m_offa; int m_offb; int m_offmax; Filter(const Filter &); // not supplied Filter &operator=(const Filter &); // not supplied }; #endif