Skip to content
AmrZriekPublic

About

Lowers Windows audio volume above your limit, to protect your hearing and IEMs from 100% spikes on plug-in, reconnect, or wake. Portable 94 KB exe, no installer.

Topics

Resources

Stars

17 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

10 Commits

Folders and files

Repository files navigation

πŸ›‘οΈ EarGuard for Windows

Hardware Volume Spike Protector for IEM & Headphone Audiophiles

EarGuard Logo

Release Download Platform .NET No external dependencies Lower Only License Ko-fi

Download EarGuard


🎧 The Problem: The Shotgun in Your Ear Canal

Fellas with IEMs and dongle DACs, I have a gift for you.

I’m sure you value your hearing, so I built EarGuard. Because it only takes one accidental 100% volume blast with low-impedance, ultra-sensitive IEMs to realize you have a literal 12-gauge shotgun pointed directly inside your ear canal.

If you own a dongle without a physical gain knob, you already know the terror:

  1. You plug in your dongle or wake your PC from sleep.
  2. Windows Audio Service (AudioSrv) suffers amnesia, forgets your previous volume, and cheerfully initializes the endpoint at 1.0 (100% master volume).
  3. Tidal in Exclusive Mode grabs hardware exclusive access and demands full digital line-level output.
  4. Playback may start far louder than you intended, risking hearing damage.

EarGuard detects and lowers endpoint volume above your chosen limit. It runs in the tray and uses Windows CoreAudio callbacks with a watchdog behind them. Enforcement is reactive: a brief spike can get through before it responds, and some devices or drivers blunt it entirely. It is not a hearing-safety guarantee, and percentages are not sound-pressure measurements. Keep your listening level low anyway.


πŸ“Έ The Interface

No bloated Electron. No web views. No 300 MB installer. Just a compact, native Windows interface:

EarGuard UI Screenshot


Features

It only ever lowers. One routine writes endpoint volume. It reads the current scalar and asks for a smaller value only when what it read sits above your limit, so raising a ceiling or re-enabling protection on a quiet device writes nothing. EarGuard serializes its own read-compare-write transactions. Windows has no atomic read-and-set, so another app or your own hand on the volume key can still slip a change in between; if something lowers the volume mid-transaction, EarGuard's pending request can land above the newer value. That's a real gap, not a theoretical one.

Your DAC shows up as your DAC. Windows hands out form-factor names, which is how you end up with three entries called "Speakers". EarGuard includes the device name, so you see Speakers (Realtek(R) Audio), Speakers (fifine Microphone), Headphones (Apple USB-C Adapter) and can tell them apart.

Plug-ins and wake-ups start quiet. A new endpoint, or a resume from sleep, holds a three-second limit (the Safe Plug-in Limit, 5% by default). Windows restores an endpoint's previous volume a few hundred milliseconds after it appears, which is why a single clamp at detection time isn't enough: callbacks and the watchdog keep pulling the level back down through that window. Late restores included. When the three seconds are up the normal ceiling takes over, and a restored value below the ceiling is left alone. Nothing here blocks playback while EarGuard reacts.

The window opens on whatever you're actually listening to. It follows the Windows default endpoint until you pick a device yourself, including deliberately re-picking the one already selected. After that your choice sticks for the session, as long as the device is still around.

Per-device, no global off switch. The Protect checkbox is per endpoint. Unchecking it doesn't touch the volume; EarGuard just stops limiting that device. Enabled devices stay monitored the whole time EarGuard runs.

Endpoint-level, not app-level. It controls the Windows output volume, below the player's own volume control, which is why it still bites in WASAPI exclusive mode when the device and driver expose hardware volume. Not every driver does.

Alerts you can't hear. When EarGuard lowers something, an optional tray notification names the device and both levels. The notification makes no sound, so the "protection" notice never becomes the loudest thing in the room.

One compact executable. A single portable executable using .NET Framework 4.8, with no installer or extra dependencies.

Starts hidden. With "Start with Windows" on, EarGuard launches into the tray without opening the window. Double-clicking the executable, or the tray icon, opens the interface.

Moving the file doesn't break startup. Enabling "Start with Windows" installs a copy to %LOCALAPPDATA%\EarGuard and points the logon task at that, not at wherever you happened to run it from. Delete the download afterwards, move the folder, empty Downloads. Sign-in still works.


πŸš€ Quick Start

  1. Download EarGuard.exe from the Releases page.
  2. Run EarGuard.exe. It opens the window and detects your audio outputs.
  3. Select your headphone/DAC dongle from the dropdown, verify [βœ“] Protect is checked, and set your Hard Volume Ceiling (e.g. 30%) and Safe Plug-in Limit (e.g. 5%).
  4. Check "Start with Windows" and minimize to tray. Keep your listening volume low; EarGuard is an extra precaution, not a hearing-safety guarantee.

πŸ› οΈ Compiling from Source

Run this from a PowerShell terminal in the repository directory to test and build EarGuard:

powershell -ExecutionPolicy Bypass -File build.ps1 -BuildOnly

The script prints the path to the built executable.

For a quick build with the C# compiler included with Windows:

& "$env:WINDIR\Microsoft.NET\Framework64\v4.0.30319\csc.exe" '@EarGuard.rsp'

This creates EarGuard.exe in the repository directory. Close any copy running from that directory first.


πŸ“‹ Release Notes

v1.1.3

  • Fixed recovery after audio-device scans or volume notifications fail.
  • Settings can recover from a backup. If saving fails, your choices stay active and the window tells you they haven't been saved.
  • Fixed startup checks and removed the scheduled task's three-day runtime limit.
  • Fixed stale readings in the live volume gauge and improved logo display in notifications and the window.
  • Adjusted default window dimensions so the interface fits content without forcing a vertical scrollbar on launch.

SHA-256: 109166E5B50690570AF410F70C00A2402060C18F448C8A92347FE3B92959BEC7

v1.1.2

"Start with Windows" now survives moving or deleting the folder you launched EarGuard from: startup registers a durable per-user copy at %LOCALAPPDATA%\EarGuard\EarGuard.exe, and stale registrations repair themselves on the next launch. The tray icon also keeps its logo on the exe-only installed copy.

SHA-256: C3A7050104555BA5DE9EF588337CF64C3309F057CAFA8F8F9FB242CE5205572F

Full notes: v1.1.2 release

v1.1.1

Fixes for protection quietly dropping out after a device reconnect or waking from sleep, plus a significant cut in background churn. Full notes: v1.1.1 release.

v1.1.0

See the v1.1.0 release for deterministic logon startup, the MMCSS pro-audio worker, and self-healing recovery.

v1.0.0

Initial release of EarGuard for Windows. See the v1.0.0 release.


🎡 Tips for Audiophile Players (Tidal, Foobar2000, Qobuz)

  • Tidal: If you use WASAPI Exclusive Mode, turn off "Force Volume" in the DAC's output settings so the player does not keep requesting full volume. Check behavior with your device; EarGuard cannot control every driver or exclusive-mode path.
  • Foobar2000: WASAPI exclusive output needs hardware endpoint volume support for EarGuard's changes to affect playback. Shared-mode output uses Windows' endpoint volume control.

β˜• Support

If EarGuard helped you catch an unexpected volume change, consider buying me a coffee!

Support on Ko-fi

πŸ‘‰ https://ko-fi.com/amrzriek


πŸ“œ License

MIT License. Free and open source for the audio community. Share it with anyone who owns sensitive IEMs and values their hearing.

About

Lowers Windows audio volume above your limit, to protect your hearing and IEMs from 100% spikes on plug-in, reconnect, or wake. Portable 94 KB exe, no installer.

Topics

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages