# HG changeset patch # User Ulf.Hammarqvist@gmail.com # Date 1332966268 0 # Node ID 5f1f55b23301271a0b40774de3b0f450427b7c46 # Parent da49bc37a6ddb05091387f7e9a3f763016717044 diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/AGC.cpp --- a/branches/carfac_cpp/src/AGC.cpp Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/AGC.cpp Wed Mar 28 20:24:28 2012 +0000 @@ -1,8 +1,7 @@ #include "AGC.h" -AGC_coefficients::AGC_coefficients() { - // TODO Auto-generated constructor stub - +AGC_coefficients:: AGC_coefficients(AGC_parameters* AGC_params, float fs, int n_ch){ + // TODO stuff goes here } AGC_coefficients::~AGC_coefficients() { diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/AGC.h --- a/branches/carfac_cpp/src/AGC.h Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/AGC.h Wed Mar 28 20:24:28 2012 +0000 @@ -7,11 +7,11 @@ public: AGC_parameters(){ n_stages = 4; // redundant? -// time_constants = {1, 4, 16, 64}; + time_constants = {0.002*1, 0.002*4, 0.002*16, 0.002*64}; AGC_stage_gain = 2; -// decimation = {8, 2, 2, 2}; -// AGC1_scales = {1.0, 1.4, 2.0, 2.8}; -// AGC2_scales = {1.6, 2.25, 3.2, 4.5}; + decimation = {8, 2, 2, 2}; + AGC1_scales = {1.0, 1.4, 2.0, 2.8}; + AGC2_scales = {1.6, 2.25, 3.2, 4.5}; detect_scale = 0.25; AGC_mix_coeff = 0.5; } @@ -31,8 +31,10 @@ class AGC_coefficients { public: + AGC_coefficients(AGC_parameters*, float, int); + virtual ~AGC_coefficients(); +private: AGC_coefficients(); - virtual ~AGC_coefficients(); }; #endif /* AGC_H_ */ diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/CAR.h --- a/branches/carfac_cpp/src/CAR.h Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/CAR.h Wed Mar 28 20:24:28 2012 +0000 @@ -38,7 +38,7 @@ CAR_coefficients(CAR_parameters*, float, FloatArray); virtual ~CAR_coefficients(); private: - CAR_coefficients(){}; + CAR_coefficients(){} }; #endif /* CAR_H_ */ diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/CARFAC.cpp --- a/branches/carfac_cpp/src/CARFAC.cpp Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/CARFAC.cpp Wed Mar 28 20:24:28 2012 +0000 @@ -20,16 +20,19 @@ FloatArray pole_freqs; //TODO: do it CAR_coeffs = new CAR_coefficients(CAR_params, fs, pole_freqs); - // etc ... lots of it + int n_ch = 10; // TODO: do the design loops + AGC_coeffs = new AGC_coefficients(AGC_params, fs, n_ch); + + IHC_coeffs = new IHC_coefficients(IHC_params, fs, n_ch); } CARFAC::~CARFAC() { delete CAR_coeffs; - delete CAR_params; + //delete CAR_params; delete IHC_coeffs; - delete IHC_params; + //delete IHC_params; delete AGC_coeffs; - delete AGC_params; + //delete AGC_params; } diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/IHC.cpp --- a/branches/carfac_cpp/src/IHC.cpp Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/IHC.cpp Wed Mar 28 20:24:28 2012 +0000 @@ -1,8 +1,7 @@ #include "IHC.h" -IHC_coefficients::IHC_coefficients() { - // TODO Auto-generated constructor stub - +IHC_coefficients::IHC_coefficients(IHC_parameters* IHC_params, float fs, int n_ch){ + // TODO stuff! } IHC_coefficients::~IHC_coefficients() { diff -r da49bc37a6dd -r 5f1f55b23301 branches/carfac_cpp/src/IHC.h --- a/branches/carfac_cpp/src/IHC.h Wed Mar 28 17:20:06 2012 +0000 +++ b/branches/carfac_cpp/src/IHC.h Wed Mar 28 20:24:28 2012 +0000 @@ -23,8 +23,10 @@ class IHC_coefficients { public: - IHC_coefficients(); + IHC_coefficients(IHC_parameters*, float, int); virtual ~IHC_coefficients(); +private: + IHC_coefficients(){} }; #endif /* IHC_H_ */