6#ifndef SBL_DSP_FILTERS_DC_BLOCK_HPP_
7#define SBL_DSP_FILTERS_DC_BLOCK_HPP_
35 void set_pole(
float r) { r_ = r < 0.0f ? 0.0f : (r >= 1.0f ? 0.99999994f : r); }
45 const float y = x - x1_ + r_ * y1_;
64 void process(
const float* in,
float* out, uint16_t frames) {
65 for (uint16_t i = 0; i < frames; ++i) {
77 float pole()
const {
return r_; }
A one-pole high-pass with its zero at DC.
static constexpr transport::Parameter< DcBlock > PARAMETERS[]
The parameters, for tools.
float process(float x)
One frame.
static constexpr float DEFAULT_POLE
void reset()
Clear the state.
float pole() const
The pole.
void set_pole(float r)
Set the pole; closer to 1 is a lower corner.
void process(const float *in, float *out, uint16_t frames)
A buffer of frames. In place is fine: out may be in.
static constexpr float DEFAULT_CORNER
The processing call's shape as a checked contract.