comparison branches/carfac_cpp/src/CARFAC.cpp @ 546:e5ae2ed4249c

(none)
author Ulf.Hammarqvist@gmail.com
date Sat, 31 Mar 2012 17:36:22 +0000
parents e63fbe19b255
children cffa9e98eb45
comparison
equal deleted inserted replaced
545:e63fbe19b255 546:e5ae2ed4249c
1 #include <cmath>
2
1 #include "CARFAC.h" 3 #include "CARFAC.h"
2 #include "CAR.h" 4 #include "CAR.h"
3 #include "IHC.h" 5 #include "IHC.h"
4 #include "AGC.h" 6 #include "AGC.h"
5 7
23 pole_hz = pole_hz - car_params->erb_per_step_ * 25 pole_hz = pole_hz - car_params->erb_per_step_ *
24 ERB_Hz(pole_hz, erb_break_freq, erb_q); 26 ERB_Hz(pole_hz, erb_break_freq, erb_q);
25 } 27 }
26 n_ch_ = pole_freqs_.size(); // STL specific 28 n_ch_ = pole_freqs_.size(); // STL specific
27 29
30 max_channels_per_octave_ = log(2) / log(pole_freqs_[0]/pole_freqs_[1]);
31
28 // replace with feeding this (as const ref) instead? Saves storing doubly 32 // replace with feeding this (as const ref) instead? Saves storing doubly
29 car_coeffs_ = new CAR_coefficients(car_params_, fs_, pole_freqs_); 33 car_coeffs_ = new CAR_coefficients(car_params_, fs_, pole_freqs_);
30 ihc_coeffs_ = new IHC_coefficients(ihc_params_, fs_, n_ch_); 34 ihc_coeffs_ = new IHC_coefficients(ihc_params_, fs_, n_ch_);
31 agc_coeffs_ = new AGC_coefficients(agc_params_, fs_, n_ch_); 35 agc_coeffs_ = new AGC_coefficients(agc_params_, fs_, n_ch_);
32 36