One-pole DC blocker (first-order high-pass). More...
#include <dc_blocker.hpp>
Public Member Functions | |
| DcBlocker ()=default | |
| void | set_pole (T pole) |
| Set the pole position (typically 0.99..0.999). | |
| void | reset () |
| Clear filter state. Call between unrelated streams. | |
| T | process (T x) |
| Process one sample. | |
| void | process (T *samples, int n) |
| Process a block in-place. | |
One-pole DC blocker (first-order high-pass).
Removes DC offset and very-low-frequency drift from an audio stream without measurably altering the audio band.
RT contract: set_pole(), reset(), and process paths are scalar-only and allocate no memory.
Transfer function: H(z) = (1 - z^-1) / (1 - p * z^-1) where p is the pole position (default 0.995 → ~3.5 Hz corner at 44.1 kHz).
For a more aggressive corner frequency, use a higher-order HPF biquad instead — this primitive is intentionally minimal.
|
default |
|
inline |
Process a block in-place.
|
inline |
Process one sample.
|
inline |
Clear filter state. Call between unrelated streams.
|
inline |
Set the pole position (typically 0.99..0.999).
Higher values give a lower corner frequency. At 44.1 kHz: 0.995 ≈ 3.5 Hz, 0.999 ≈ 0.7 Hz.