Skip to content

Commit

Permalink
Merge pull request #20 from bw3/master
Browse files Browse the repository at this point in the history
Fix gain calculation for EQ 2nd order low pass filters.
  • Loading branch information
MCUdude committed Aug 2, 2021
2 parents 3b2f61d + 124ad21 commit edfac6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SigmaDSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void SigmaDSP::EQsecondOrder(uint16_t startMemoryAddress, secondOrderEQ_t &equal
a1 = -2*cos(w0);
a2 = 1 - alpha;
b0 = (1 - cos(w0)) * (gainLinear/2);
b1 = 1 - cos(w0) * gainLinear;
b1 = (1 - cos(w0)) * gainLinear;
b2 = (1 - cos(w0)) * (gainLinear/2);
break;

Expand Down Expand Up @@ -575,7 +575,7 @@ void SigmaDSP::EQsecondOrder(uint16_t startMemoryAddress, secondOrderEQ_t &equal
a1 = -2*cos(w0);
a2 = 1 - alpha;
b0 = (1 - cos(w0)) * gainLinear / 2;
b1 = 1 - cos(w0) * gainLinear;
b1 = (1 - cos(w0)) * gainLinear;
b2 = (1 - cos(w0)) * gainLinear / 2;
break;

Expand All @@ -597,7 +597,7 @@ void SigmaDSP::EQsecondOrder(uint16_t startMemoryAddress, secondOrderEQ_t &equal
a1 = -2*cos(w0);
a2 = 1 - alpha;
b0 = (1 - cos(w0)) * gainLinear / 2;
b1 = 1 - cos(w0) * gainLinear;
b1 = (1 - cos(w0)) * gainLinear;
b2 = (1 - cos(w0)) * gainLinear / 2;
break;

Expand Down

0 comments on commit edfac6c

Please sign in to comment.