diff --git a/crap/eq_const_T420.hpp b/crap/eq_const_T420.hpp index 75796c7..4659848 100644 --- a/crap/eq_const_T420.hpp +++ b/crap/eq_const_T420.hpp @@ -10,9 +10,9 @@ struct Crap_eq_const_T420 :public AdjustAll> { - static constexpr ulong id = 0x0DEFACED; - static constexpr char label[] = "crap_eq_const"; - static constexpr char name[] = "crap Constant Equalizer"; + static constexpr ulong id = 0x0DEFACED + 420; + static constexpr char label[] = "crap_eq_const_T420"; + static constexpr char name[] = "crap T420 Speaker Compensation"; static constexpr char author[] = "Connor Olding"; static constexpr char copyright[] = "MIT"; @@ -72,6 +72,8 @@ struct Crap_eq_const_T420 f[13] = biquad_gen(FILT_PEAKING, 490, -1.5, 0.23, fs); f[14] = biquad_gen(FILT_PEAKING, 3100, 5.0, 0.33, fs); f[15] = biquad_gen(FILT_LOWPASS, 14000, 0.0, 0.40, fs); + for (int i = 0; i < bands; i++) + filters_R[i] = filters_L[i]; } }; diff --git a/crap/eq_const_T420_svf.hpp b/crap/eq_const_T420_svf.hpp index 62ef5aa..56cefe2 100644 --- a/crap/eq_const_T420_svf.hpp +++ b/crap/eq_const_T420_svf.hpp @@ -13,7 +13,7 @@ struct Crap_eq_const_T420_svf :public AdjustAll> { static constexpr ulong id = 0x0DEFACED + 420 + 1337; - static constexpr char label[] = "crap_eq_const"; + static constexpr char label[] = "crap_eq_const_T420_svf"; static constexpr char name[] = "crap T420 Speaker Compensation (SVF)"; static constexpr char author[] = "Connor Olding"; static constexpr char copyright[] = "MIT"; @@ -24,7 +24,7 @@ struct Crap_eq_const_T420_svf svf_matrix filters_L[bands]; svf_matrix filters_R[bands]; - virtual inline void + inline void process2(v4sf *buf_L, v4sf *buf_R, ulong rem) { svf_matrix *f0, *f1; @@ -48,10 +48,10 @@ struct Crap_eq_const_T420_svf inline void resume() { - svf_matrix *filters = filters_L; - for (int i = 0; i < bands; i++) - filters[i].memory = v4sf(0); - memcpy(filters_R, filters, bands*sizeof(svf_matrix)); + for (int i = 0; i < bands; i++) { + filters_L[i].memory = v4sf(0); + filters_R[i].memory = v4sf(0); + } } static inline void @@ -79,6 +79,9 @@ struct Crap_eq_const_T420_svf f[13] = gen(FILT_PEAKING, 490, -1.5, 0.23, fs); f[14] = gen(FILT_PEAKING, 3100, 5.0, 0.33, fs); f[15] = gen(FILT_LOWPASS, 14000, 0.0, 0.40, fs); + #undef gen + for (int i = 0; i < bands; i++) + filters_R[i] = filters_L[i]; } }; diff --git a/crap/tube.hpp b/crap/tube.hpp index 3958335..fc24b61 100644 --- a/crap/tube.hpp +++ b/crap/tube.hpp @@ -65,7 +65,7 @@ struct Crap_tube for (ulong i = 0; i < rem; i++) drives[i] = v2df(drive.smooth()); for (ulong i = 0; i < rem; i++) - drives[i] = v2df(wet.smooth()); + wets[i] = v2df(wet.smooth()); for (ulong i = 0; i < rem; i++) buf[i] = Tube::process(buf[i], drives[i], wets[i]);