Skip to content

Commit 511df46

Browse files
committed
replace number with constant in Biquad
1 parent ea35839 commit 511df46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/synthio/Biquad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void synthio_biquad_filter_samples(mp_obj_t self_in, biquad_filter_state *st, in
213213

214214
for (size_t n = n_samples; n; --n, ++buffer) {
215215
int32_t input = *buffer;
216-
int32_t output = synthio_sat16((b0 * input + b1 * x0 + b2 * x1 - a1 * y0 - a2 * y1 + (1 << (BIQUAD_SHIFT - 1))), 15);
216+
int32_t output = synthio_sat16((b0 * input + b1 * x0 + b2 * x1 - a1 * y0 - a2 * y1 + (1 << (BIQUAD_SHIFT - 1))), BIQUAD_SHIFT);
217217

218218
x1 = x0;
219219
x0 = input;

0 commit comments

Comments
 (0)