Small WASAPI loopback utility that applies a peak limiter to the audio from any render endpoint you select.
# Release build
.\build.ps1
# Debug build with verbose logging
.\build.ps1 -Configuration Debug -VerboseThe script requires Zig on your PATH and the Windows 10 SDK installed under C:\Program Files (x86)\Windows Kits\10.
# Show available render endpoints and their indexes
.\bin\audio_limit.exe --list-devices
.\bin\audio_limit.exe --threshold -7 --render-index 0
# Capture default system output, limit peaks at -10 dBFS, play back to default device
.\bin\audio_limit.exe --threshold -10 --attack 3 --release 80 --makeup 0
# Capture from device index 2 (e.g. HDMI output), render to device index 0 (speakers)
.\bin\audio_limit.exe --capture-index 2 --render-index 0 --threshold -12 --attack 4 --release 120Route the game (or per-app output via Windows "App volume and device preferences") to an unused physical endpoint, such as HDMI or secondary speakers. Run the limiter with that endpoint as --capture-index and your real headphones as --render-index. Avoid capturing and rendering on the same device unless the original stream is muted to prevent doubling.
Install a virtual audio driver (VB-Cable, VoiceMeeter VAIO, Virtual Audio Cable, etc.). Set the game or Windows default output to the virtual device. Start the limiter with --capture-index <virtual> and --render-index <headset>. The limiter then processes everything before it reaches your ears.
--threshold <dB>: Ceiling in dBFS; more negative values clamp peaks harder (default-6).--attack <ms>: Attack time; shorter reacts faster to transients (default5).--release <ms>: Release time; longer reduces pumping artifacts (default50).--makeup <dB>: Post-limiter gain; keep0when you only want to reduce volume.
Restart the program after changing parameters; settings are read at launch.
- Capture and render devices must share channel count and sample rate.
- Press
Ctrl+Cin the console to stop. - Keep Windows set to 48 kHz for best latency when possible.