Skip to content

Commit

Permalink
sg5k: calcBiquad: add missing break; for hishelf
Browse files Browse the repository at this point in the history
There was a missing `break;` at the end of the FILTER_HISHELF
case in the calculations, meaning a hishelf coeff calc always
returned the default fallthrough case, which is a benign passthrough
filter.

Fix by adding the `break;`.

Fixes: PaulStoffregen#343

Signed-off-by: Graham Whaley <graham.whaley@gmail.com>
  • Loading branch information
grahamwhaley committed Dec 29, 2020
1 parent 5e4bc31 commit 71367e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions control_sgtl5000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ void calcBiquad(uint8_t filtertype, float fC, float dB_Gain, float Q, uint32_t q
a0 = (A+1.0F) - ((A-1.0F)*cosw) + (beta*sinw);
a1 = -2.0F * ((A-1.0F) - ((A+1.0F)*cosw));
a2 = -((A+1.0F) - ((A-1.0F)*cosw) - (beta*sinw));
break;
default:
b0 = 0.5;
b1 = 0.0;
Expand Down

0 comments on commit 71367e6

Please sign in to comment.