You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(audio): preserve INT16_MIN through the signal noise gate #4521
SignalConditioner::applyNoiseGate stores -sample in an i16. Negating -32768 produces 32768 in promoted arithmetic, then narrows back to -32768. The comparison treats a full-scale negative sample as below threshold and zeros it.
Repro: disable DC removal and spike filtering, enable the noise gate, and process one -32768 sample. Expected gate open and -32768 output; actual gate closed and 0 output.
Proposal
Compute absolute magnitude in a wider signed type before threshold comparison.
Acceptance criteria
Add a focused RED→GREEN regression for -32768 with other filters disabled.
The gate reports open for that sample and preserves it when gain settings otherwise leave it unchanged; neighboring negative/positive amplitudes still follow the threshold.
Decisions
Isolate the gate in tests because default spike filtering can mask this defect.
Priority: medium; this drops legitimate full-scale PCM peaks.
Activity