ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
highpass_filter_t Struct Reference

noise gate keeps the values that move through the subsystem: threshold, attack_ns, release_ns, hysteresis. Some members are pointers into caller- or subsystem-owned memory, so lifetime follows the API that populated them rather than the struct copy itself. More...

#include <include/ascii-chat/audio/mixer.h>

Data Fields

float cutoff_hz
 Cutoff frequency in Hz (frequencies below this are attenuated).
float sample_rate
 Sample rate in Hz (set during initialization).
float alpha
 Filter coefficient alpha (calculated from cutoff_hz).
float prev_input
 Previous input sample (filter state).
float prev_output
 Previous output sample (filter state).

Detailed Description

noise gate keeps the values that move through the subsystem: threshold, attack_ns, release_ns, hysteresis. Some members are pointers into caller- or subsystem-owned memory, so lifetime follows the API that populated them rather than the struct copy itself.

High-pass filter settings and state

Implements first-order IIR high-pass filter to remove low-frequency noise, rumble, and DC offset. Useful for cleaning up microphone input.

FILTER BEHAVIOR:

  • Attenuates frequencies below cutoff_hz
  • Passes frequencies above cutoff_hz with minimal phase shift
  • First-order design provides gentle rolloff (-6dB/octave)
Note
Filter state (prev_input, prev_output) must be preserved between samples for proper operation.

Definition at line 222 of file mixer.h.


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