annotate include/CARFAC.h @ 503:83cd5bbf2a3e carfac_cpp

* Added class Ear, and moved the CARFAC members AGC CAR IHC into Ear. CARFAC now holds an array of Ear. TBD what is best. * Moved the files around, and introduced a makefile that builds unittests using GTest. (Note, GTest path is configured in makefile atm.). - two moronic tests implemented. :)
author Ulf.Hammarqvist@gmail.com
date Sun, 20 May 2012 22:36:47 +0000
parents
children 71e3794ececa
rev   line source
Ulf@503 1 #ifndef CARFAC_H_
Ulf@503 2 #define CARFAC_H_
Ulf@503 3
Ulf@503 4 #include "CAR.h"
Ulf@503 5 #include "IHC.h"
Ulf@503 6 #include "AGC.h"
Ulf@503 7 #include "Ear.h"
Ulf@503 8 #include <vector>
Ulf@503 9
Ulf@503 10 const double kDefaultFs = 22050;
Ulf@503 11
Ulf@503 12 class CARFAC{
Ulf@503 13 public:
Ulf@503 14 CARFAC(int, CAR_parameters*, IHC_parameters*, AGC_parameters*, int);
Ulf@503 15 virtual ~CARFAC();
Ulf@503 16 static float ERB_Hz(float, float, float);
Ulf@503 17
Ulf@503 18 float fs_;
Ulf@503 19
Ulf@503 20 int n_ch_; // these three, push down to ear level?
Ulf@503 21 float max_channels_per_octave_;
Ulf@503 22 FloatArray pole_freqs_;
Ulf@503 23
Ulf@503 24 int n_ears_;
Ulf@503 25 std::vector<Ear> ears_;
Ulf@503 26
Ulf@503 27 private:
Ulf@503 28 CARFAC(){};
Ulf@503 29
Ulf@503 30 };
Ulf@503 31
Ulf@503 32 #endif /* CARFAC_H_ */