mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 10:53:31 +00:00
ad2be09ee9
## Summary - Normalises all 20 SFX files to -22 LUFS with true peak ≤ -2 dBFS - Collapses a ~20dB loudness spread (hydrogen-hit at -14.94 LUFS vs sam-hit at -34.56 LUFS) into ~2dB - Previously jarring hits (hydrogen, atom, MIRV) pulled down 6–8dB; previously-quiet hits (sam-hit, message) brought up to match - Short clips (`click.mp3`, `ka-ching.mp3`) too short for EBU R128 — got a flat -6dB trim ## Why Addresses #3728, specifically the "*WAY too loud*" feedback. Loudest clips were peaking within ~1.5dB of clipping. Does **not** change overlap/stacking — per discussion in #3728 and #3394, the 8-concurrent-sound channel limit is retained intentionally. At -22 LUFS, multiple overlapping events remain comfortable. ## Before / after (key files) | Effect | Before (LUFS / TP dBFS) | After (LUFS / TP dBFS) | Δ | |---|---|---|---| | hydrogen-hit | -14.94 / -1.62 | -22.52 / -9.10 | −7.6 dB | | atom-launch | -17.16 / -1.53 | -23.84 / -8.14 | −6.7 dB | | hydrogen-launch | -16.15 / -1.92 | -23.65 / -9.37 | −7.5 dB | | mirv-launch | -19.08 / -3.17 | -24.80 / -9.80 | −5.7 dB | | sam-hit | -34.56 / -10.77 | -23.97 / -1.98 | +10.6 dB (raised up) | | message | -29.47 / -24.46 | -21.97 / -17.00 | +7.5 dB (raised up) | All durations unchanged (verified with `ffprobe`). All true peaks stay below -1 dBFS — no clipping. ## How Applied with ffmpeg's EBU R128 `loudnorm` filter: ``` ffmpeg -i in.mp3 -af "loudnorm=I=-22:TP=-2:LRA=7" -codec:a libmp3lame -q:a 2 out.mp3 ``` Files shorter than the 1-second EBU R128 window (`click.mp3` 153ms, `ka-ching.mp3` 586ms) used \`-af volume=-6dB\` instead. ## Test plan - [x] Singleplayer: launch atom / hydrogen / MIRV nukes, verify detonations are satisfying but not startling - [x] Build city / port / warship / SAM, verify construction sounds sit naturally in the mix - [x] Trigger alliance suggest/break, verify they match loudness of build sounds - [x] Trigger many simultaneous events, verify the mix is comfortable - [x] Verify no audio truncation / glitching / clipping Addresses #3728
84 KiB
84 KiB