feat(audio): mix-bus soft peak limiter
Replace the mixer's per-sample hard clamp with a lossless i32 bus sum fed through a feed-forward soft limiter (instant attack, ~120ms release). Below the ceiling it's transparent and sample-exact; loud multi-peer moments are ridden down to the ceiling instead of shattering into hard-clip distortion. State carries across frames so a sustained-loud stretch doesn't re-attack every 20ms frame. The master output gain now applies inside the limiter so a boost past the ceiling is limited too. mix_frames now returns the lossless i32 sum (saturation responsibility moved to the limiter); its tests assert losslessness, and the new limiter module carries the saturation/transparency/release guarantees. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -53,5 +53,6 @@ pub trait AudioBackend: Send + Sync {
|
||||
|
||||
pub mod echo_cancel;
|
||||
pub mod gate;
|
||||
pub mod limiter;
|
||||
pub mod pipewire_impl;
|
||||
pub mod pw_cli;
|
||||
|
||||
Reference in New Issue
Block a user