Skip to content

Commit 5925038

Browse files
authored
Merge pull request #167 from tomcombriat/ResonantFilter
Changed internal functions name of ResonantFilter to current() for lo…
2 parents e642c01 + 9ef28be commit 5925038

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ResonantFilter.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class ResonantFilter
129129
inline AudioOutputStorage_t next(AudioOutputStorage_t in)
130130
{
131131
advanceBuffers(in);
132-
return next(in, Int2Type<FILTER_TYPE>());
132+
return current(in, Int2Type<FILTER_TYPE>());
133133
}
134134

135135
protected:
@@ -154,13 +154,13 @@ class ResonantFilter
154154
buf1 += ifxmul(buf0 - buf1, f); // could overflow if input changes fast
155155
}
156156

157-
inline AudioOutputStorage_t next(AudioOutputStorage_t in, Int2Type<LOWPASS>) {return buf1;}
157+
inline AudioOutputStorage_t current(AudioOutputStorage_t in, Int2Type<LOWPASS>) {return buf1;}
158158

159-
inline AudioOutputStorage_t next(AudioOutputStorage_t in, Int2Type<HIGHPASS>) {return in - buf0;}
159+
inline AudioOutputStorage_t current(AudioOutputStorage_t in, Int2Type<HIGHPASS>) {return in - buf0;}
160160

161-
inline AudioOutputStorage_t next(AudioOutputStorage_t in, Int2Type<BANDPASS>) {return buf0-buf1;}
161+
inline AudioOutputStorage_t current(AudioOutputStorage_t in, Int2Type<BANDPASS>) {return buf0-buf1;}
162162

163-
inline AudioOutputStorage_t next(AudioOutputStorage_t in, Int2Type<NOTCH>) {return in - buf0 + buf1;}
163+
inline AudioOutputStorage_t current(AudioOutputStorage_t in, Int2Type<NOTCH>) {return in - buf0 + buf1;}
164164

165165
// multiply two fixed point numbers (returns fixed point)
166166
inline typename IntegerType<sizeof(su)+sizeof(su)>::unsigned_type ucfxmul(su a, typename IntegerType<sizeof(su)+sizeof(su)>::unsigned_type b)
@@ -196,19 +196,19 @@ inline void next (AudioOutputStorage_t in)
196196
/** Return the input filtered with a lowpass filter
197197
@return the filtered signal output.
198198
*/
199-
inline AudioOutputStorage_t low() {return ResonantFilter<LOWPASS,su>::next(last_in,Int2Type<LOWPASS>());}
199+
inline AudioOutputStorage_t low() {return ResonantFilter<LOWPASS,su>::current(last_in,Int2Type<LOWPASS>());}
200200
/** Return the input filtered with a highpass filter
201201
@return the filtered signal output.
202202
*/
203-
inline AudioOutputStorage_t high() {return ResonantFilter<LOWPASS,su>::next(last_in,Int2Type<HIGHPASS>());}
203+
inline AudioOutputStorage_t high() {return ResonantFilter<LOWPASS,su>::current(last_in,Int2Type<HIGHPASS>());}
204204
/** Return the input filtered with a bandpass filter
205205
@return the filtered signal output.
206206
*/
207-
inline AudioOutputStorage_t band() {return ResonantFilter<LOWPASS,su>::next(last_in,Int2Type<BANDPASS>());}
207+
inline AudioOutputStorage_t band() {return ResonantFilter<LOWPASS,su>::current(last_in,Int2Type<BANDPASS>());}
208208
/** Return the input filtered with a notch filter
209209
@return the filtered signal output.
210210
*/
211-
inline AudioOutputStorage_t notch() {return ResonantFilter<LOWPASS,su>::next(last_in,Int2Type<NOTCH>());}
211+
inline AudioOutputStorage_t notch() {return ResonantFilter<LOWPASS,su>::current(last_in,Int2Type<NOTCH>());}
212212

213213
private:
214214
AudioOutputStorage_t last_in;

keywords.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ BANDPASS LITERAL1
3030
HIGHPASS LITERAL1
3131
NOTCH LITERAL1
3232

33-
MultiFilter KEYWORD1
33+
MultiResonantFilter KEYWORD1
3434
next KEYWORD2
3535
low KEYWORD2
3636
high KEYWORD2

0 commit comments

Comments
 (0)