Skip to content

Commit

Permalink
Limit HPF cutoff to samplerate / 4
Browse files Browse the repository at this point in the history
  • Loading branch information
pmattila committed Sep 11, 2024
1 parent ac302cf commit 5e9b6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/common/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ FAST_CODE void firstOrderLPFUpdate(order1Filter_t *filter, float cutoff, float s

FAST_CODE void firstOrderHPFUpdate(order1Filter_t *filter, float cutoff, float sampleRate)
{
cutoff = limitCutoff(cutoff, sampleRate);
cutoff = limitCutoff(cutoff, sampleRate / 2);

const float W = tan_approx(M_PIf * cutoff / sampleRate);

Expand Down

0 comments on commit 5e9b6ed

Please sign in to comment.