changeset 542:5f1f55b23301

(none)
author Ulf.Hammarqvist@gmail.com
date Wed, 28 Mar 2012 20:24:28 +0000
parents da49bc37a6dd
children cd2f402f3bd7
files branches/carfac_cpp/src/AGC.cpp branches/carfac_cpp/src/AGC.h branches/carfac_cpp/src/CAR.h branches/carfac_cpp/src/CARFAC.cpp branches/carfac_cpp/src/IHC.cpp branches/carfac_cpp/src/IHC.h
diffstat 6 files changed, 22 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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() {
--- 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_ */
--- 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_ */
--- 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;
 }
--- 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() {
--- 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_ */