TASK 8 meter scaling: +10 dB input amplification in AudioLevelMeter.ToDisplay so the meters use the full bar — speech peaks (~0.2 RMS, -14 dBFS) read ~0.93 (red zone) and normal speech (~0.05, -26 dBFS) ~0.73 (yellow) at maxed volume, instead of hovering at the red edge; ≤0.001 linear still reads zero so the meter never idles on background noise; one knob shared by the mic bar and the game bar (× MicVolume gain-on-noise untouched); tests updated + new ToDisplay_Pushes_Speech_Peaks_Into_Red_At_Maxed_Volume — 171 tests passing, 0 warnings

This commit is contained in:
2026-08-14 08:43:06 -07:00
parent d90b5ded0d
commit 0b71b030e4
7 changed files with 53 additions and 12 deletions
+5 -2
View File
@@ -383,8 +383,11 @@ devices, no timers).
no longer touch the mixer). Mic samples feed a pure **`AudioLevelMeter`** (RMS with 0.2 exponential
smoothing) → `MicLevelChanged` → marshalled to the UI thread → `AudioLevel`; loopback samples feed a
second meter → `LoopbackLevelChanged` → the game bar's `GameAudioLevel`. The raw linear level is
mapped to the meter's display scale by `AudioLevelMeter.ToDisplay` (60..0 dBFS → 0..1): real speech/
game RMS is ~0.01..0.1 linear, which would leave a flat scale looking dead. **Mic connection state
mapped to the meter's display scale by `AudioLevelMeter.ToDisplay` (60..0 dBFS → 0..1 with **+10 dB
input amplification**): real speech/game RMS is ~0.01..0.1 linear, which would leave a flat scale
looking dead; the amplification (added 2026-08-14) pushes real speech peaks (~0.2 RMS, 14 dBFS) to
~0.93 at maxed volume so the meter uses the whole bar proportionately instead of hovering at the red
edge. **Mic connection state
surfaces as events:** `MicConnected` (source `Started`), `MicFailed` (source `Failed`), and
`RestartMic()` re-resolves + restarts just the mic (loopback keeps running). Failures log via
`AppLog`; a mic failure zeroes the meter, a loopback failure never kills the mic. Meter `Push` is