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

Ducking system settings and state. More...

#include <lib/audio/mixer.h>

Data Fields

float threshold_dB
 Speaking threshold in dB (sources below this are not "speaking")
 
float leader_margin_dB
 Leader margin in dB (sources within this of loudest are leaders)
 
float atten_dB
 Attenuation in dB for non-leader sources.
 
float attack_ms
 Ducking attack time in milliseconds.
 
float release_ms
 Ducking release time in milliseconds.
 
float attack_coeff
 Attack coefficient (converted from attack_ms)
 
float release_coeff
 Release coefficient (converted from release_ms)
 
float * envelope
 Per-source envelope follower state (linear, allocated per source)
 
float * gain
 Per-source ducking gain (linear, calculated from envelope)
 

Detailed Description

Ducking system settings and state.

Implements active speaker detection and automatic ducking (attenuation) of background sources. Prevents echo and feedback in multi-client audio scenarios.

DUCKING BEHAVIOR:

  • Detects loudest active speaker (above threshold_dB)
  • Identifies sources within leader_margin_dB of loudest (also active)
  • Attenuates non-active sources by atten_dB
  • Uses smooth attack/release for natural transitions
Note
Ducking gain is applied per-source, allowing multiple active speakers to be heard while attenuating background noise.

Definition at line 271 of file mixer.h.


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