Mercurial > hg > aimc
annotate src/CARFAC.cpp @ 480:5def66bf228f carfac_cpp
(none)
author | Ulf.Hammarqvist@gmail.com |
---|---|
date | Wed, 28 Mar 2012 17:20:06 +0000 |
parents | 83e813152671 |
children | cad69634b411 |
rev | line source |
---|---|
Ulf@477 | 1 #include "CARFAC.h" |
Ulf@477 | 2 #include "CAR.h" |
Ulf@477 | 3 #include "IHC.h" |
Ulf@477 | 4 #include "AGC.h" |
Ulf@477 | 5 |
Ulf@477 | 6 #include "CARFAC_common_typedefs.h" |
Ulf@477 | 7 |
Ulf@477 | 8 CARFAC::CARFAC(int fs = DEFAULT_FS, |
Ulf@478 | 9 CAR_parameters* _CAR_params = new CAR_parameters(), |
Ulf@478 | 10 IHC_parameters* _IHC_params = new IHC_parameters(), |
Ulf@478 | 11 AGC_parameters* _AGC_params = new AGC_parameters(), |
Ulf@477 | 12 float ERB_break_freq = DEFAULT_ERB_break_freq, |
Ulf@477 | 13 float ERB_Q = DEFAULT_ERB_Q){ |
Ulf@477 | 14 |
Ulf@480 | 15 // for now, design is to take ownership. Preferences? Make copies, call by value, etc? |
Ulf@477 | 16 CAR_params = _CAR_params; |
Ulf@477 | 17 IHC_params = _IHC_params; |
Ulf@477 | 18 AGC_params = _AGC_params; |
Ulf@477 | 19 |
Ulf@480 | 20 FloatArray pole_freqs; //TODO: do it |
Ulf@478 | 21 CAR_coeffs = new CAR_coefficients(CAR_params, fs, pole_freqs); |
Ulf@477 | 22 |
Ulf@480 | 23 // etc ... lots of it |
Ulf@477 | 24 } |
Ulf@477 | 25 |
Ulf@477 | 26 CARFAC::~CARFAC() { |
Ulf@478 | 27 delete CAR_coeffs; |
Ulf@478 | 28 delete CAR_params; |
Ulf@478 | 29 |
Ulf@478 | 30 delete IHC_coeffs; |
Ulf@478 | 31 delete IHC_params; |
Ulf@478 | 32 |
Ulf@478 | 33 delete AGC_coeffs; |
Ulf@478 | 34 delete AGC_params; |
Ulf@477 | 35 } |