ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
highpass_filter_t Struct Reference

High-pass filter settings and state. More...

#include <lib/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

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 218 of file mixer.h.


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