43 #ifndef STATEVARIABLE_H_
44 #define STATEVARIABLE_H_
83 scale = (
Q0n8)sqrt((
unsigned int)resonance << 8);
99 (AUDIO_RATE_AS_LSHIFT));
116 return next(input,
Int2Type<FILTER_TYPE>());
129 inline int next(
int input,
Int2Type<LOWPASS>) {
131 low += ((f * band) >> 16);
132 int high = (((
long)input - low - (((
long)band * q) >> 8)) * scale) >> 8;
133 band += ((f * high) >> 16);
144 inline int next(
int input,
Int2Type<BANDPASS>) {
146 low += ((f * band) >> 16);
147 int high = (((
long)input - low - (((
long)band * q) >> 8)) * scale) >> 8;
148 band += ((f * high) >> 16);
159 inline int next(
int input,
Int2Type<HIGHPASS>) {
161 low += ((f * band) >> 16);
162 int high = (((
long)input - low - (((
long)band * q) >> 8)) * scale) >> 8;
163 band += ((f * high) >> 16);
174 inline int next(
int input,
Int2Type<NOTCH>) {
176 low += ((f * band) >> 16);
177 int high = (((
long)input - low - (((
long)band * q) >> 8)) * scale) >> 8;
178 band += ((f * high) >> 16);
179 int notch = high + low;