diff options
author | Chris Robinson <[email protected]> | 2018-12-08 16:30:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-08 16:30:19 -0800 |
commit | 30a3a19574713c9ca939019d7fdea35912ad168a (patch) | |
tree | c8e7663e55d10cf167810a89a5893e7080ecaaca /Alc | |
parent | c9f5617f06503d951b3ed808cf07fb6362a7f8d1 (diff) |
Rename a member variable and inline a function
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/filters/splitter.cpp | 9 | ||||
-rw-r--r-- | Alc/filters/splitter.h | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Alc/filters/splitter.cpp b/Alc/filters/splitter.cpp index 85122890..18518dbb 100644 --- a/Alc/filters/splitter.cpp +++ b/Alc/filters/splitter.cpp @@ -20,7 +20,7 @@ void BandSplitter::init(float f0norm) lp_z1 = 0.0f; lp_z2 = 0.0f; - hp_z1 = 0.0f; + ap_z1 = 0.0f; } void BandSplitter::process(float *RESTRICT hpout, float *RESTRICT lpout, const float *input, int count) @@ -31,7 +31,7 @@ void BandSplitter::process(float *RESTRICT hpout, float *RESTRICT lpout, const f const float lp_coeff{this->coeff*0.5f + 0.5f}; float lp_z1{this->lp_z1}; float lp_z2{this->lp_z2}; - float ap_z1{this->hp_z1}; + float ap_z1{this->ap_z1}; auto proc_sample = [ap_coeff,lp_coeff,&lp_z1,&lp_z2,&ap_z1,&lpout](const float in) noexcept -> float { /* Low-pass sample processing. */ @@ -55,7 +55,7 @@ void BandSplitter::process(float *RESTRICT hpout, float *RESTRICT lpout, const f std::transform(input, input+count, hpout, proc_sample); this->lp_z1 = lp_z1; this->lp_z2 = lp_z2; - this->hp_z1 = ap_z1; + this->ap_z1 = ap_z1; } @@ -71,9 +71,6 @@ void SplitterAllpass::init(float f0norm) z1 = 0.0f; } -void SplitterAllpass::clear() -{ z1 = 0.0f; } - void SplitterAllpass::process(float *RESTRICT samples, int count) { ASSUME(count > 0); diff --git a/Alc/filters/splitter.h b/Alc/filters/splitter.h index db31c138..b39c3491 100644 --- a/Alc/filters/splitter.h +++ b/Alc/filters/splitter.h @@ -10,11 +10,11 @@ class BandSplitter { float coeff{0.0f}; float lp_z1{0.0f}; float lp_z2{0.0f}; - float hp_z1{0.0f}; + float ap_z1{0.0f}; public: void init(float f0norm); - void clear() noexcept { lp_z1 = lp_z2 = hp_z1 = 0.0f; } + void clear() noexcept { lp_z1 = lp_z2 = ap_z1 = 0.0f; } void process(float *RESTRICT hpout, float *RESTRICT lpout, const float *input, int count); }; @@ -27,7 +27,7 @@ class SplitterAllpass { public: void init(float f0norm); - void clear(); + void clear() noexcept { z1 = 0.0f; } void process(float *RESTRICT samples, int count); }; |