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

Noise gate settings and state. More...

#include <lib/audio/mixer.h>

Data Fields

float threshold
 Gate threshold in linear units (e.g., 0.01f for -40dB)
 
float attack_ms
 Attack time in milliseconds (how fast gate opens)
 
float release_ms
 Release time in milliseconds (how fast gate closes)
 
float hysteresis
 Hysteresis factor (0-1, prevents gate chatter)
 
float sample_rate
 Sample rate in Hz (set during initialization)
 
float envelope
 Current envelope follower state (linear, 0-1)
 
float attack_coeff
 Attack coefficient (converted from attack_ms)
 
float release_coeff
 Release coefficient (converted from release_ms)
 
bool gate_open
 True if gate is currently open (allowing audio through)
 

Detailed Description

Noise gate settings and state.

Implements noise gate to suppress background noise below threshold. Uses hysteresis to prevent gate chatter (rapid opening/closing).

GATE BEHAVIOR:

  • Closes (mutes) when input is below threshold
  • Opens (allows through) when input is above threshold
  • Hysteresis prevents rapid on/off cycling
  • Smooth attack/release prevents clicks and pops
Note
Hysteresis means gate opens at threshold but closes at threshold * hysteresis (lower level), preventing chatter.

Definition at line 180 of file mixer.h.


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