Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sbl::dsp::DcBlocker Class Reference

#include <dc_blocker.hpp>

Collaboration diagram for sbl::dsp::DcBlocker:

Public Member Functions

float process (float x)
 Process one sample through the DC blocker.
 
void process (float *buf, uint16_t frames)
 Process a block of float samples in-place.
 
void set_coefficient (float r)
 Set the pole coefficient.
 
void reset ()
 Reset filter state to zero.
 

Detailed Description

Definition at line 20 of file dc_blocker.hpp.

Member Function Documentation

◆ process() [1/2]

void sbl::dsp::DcBlocker::process ( float *  buf,
uint16_t  frames 
)
inline

Process a block of float samples in-place.

Parameters
bufSample buffer
framesNumber of samples

Definition at line 41 of file dc_blocker.hpp.

References process().

Here is the call graph for this function:

◆ process() [2/2]

float sbl::dsp::DcBlocker::process ( float  x)
inline

Process one sample through the DC blocker.

Note
All public methods are ISR-safe — bounded computation, no I/O.
Parameters
xInput sample
Returns
Output with DC removed

Definition at line 29 of file dc_blocker.hpp.

Referenced by process().

Here is the caller graph for this function:

◆ reset()

void sbl::dsp::DcBlocker::reset ( )
inline

Reset filter state to zero.

Definition at line 58 of file dc_blocker.hpp.

◆ set_coefficient()

void sbl::dsp::DcBlocker::set_coefficient ( float  r)
inline

Set the pole coefficient.

Higher values (closer to 1.0) = lower cutoff frequency. Default 0.995 ≈ 16 Hz at 48 kHz sample rate.

Parameters
rPole coefficient, typically 0.99-0.999

Definition at line 55 of file dc_blocker.hpp.


The documentation for this class was generated from the following file: