From 684b7fee5a73fffc5d8b0dc880233285fc863044 Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Thu, 24 Aug 2017 11:20:22 -0700 Subject: [PATCH] DC filter cutoff at 0.5Hz --- libraries/audio/src/AudioGate.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/audio/src/AudioGate.cpp b/libraries/audio/src/AudioGate.cpp index 0c4fe8b64c..a4d731a447 100644 --- a/libraries/audio/src/AudioGate.cpp +++ b/libraries/audio/src/AudioGate.cpp @@ -25,10 +25,10 @@ static inline int32_t saturateQ30(int32_t x) { } // -// First-order DC-blocking filter, with zero at 1.0 and pole at 0.99994 +// First-order DC-blocking filter, with zero at 1.0 and pole at 0.9999 // -// -3dB @ 0.5 Hz (48KHz) -// -3dB @ 0.2 Hz (24KHz) +// -3dB @ 1.0 Hz (48KHz) +// -3dB @ 0.5 Hz (24KHz) // // input in Q15, output in Q30 // @@ -41,7 +41,7 @@ public: x <<= 15; // scale to Q30 x -= _dcOffset; // remove DC - _dcOffset += x >> 14; // pole = (1.0 - 2^-14) = 0.99994 + _dcOffset += x >> 13; // pole = (1.0 - 2^-13) = 0.9999 } };