Skip to content

Releases: AmrZriek/EarGuard

v1.1.3

Choose a tag to compare

@AmrZriek AmrZriek released this 09 Oct 17:46

Reliability patch improving audio-device discovery, settings persistence, startup registration, live volume readings, and window presentation.

  • Retry device discovery and callback registration after audio-service failures and incomplete scans while the watchdog continues enforcing limits.
  • Save settings atomically with backup recovery and visible failure status; preserve active settings when a write fails.
  • Repair stale startup tasks, remove the default 72-hour runtime limit, and recognize healthy Windows-normalized registrations without rewriting them.
  • Deliver volume events in order and keep the live gauge on the latest reading instead of an older clamp value.
  • Fix native icon ownership and use the EarGuard logo for silent notifications and standalone executable fallbacks.
  • Adjust default window dimensions so the interface fits content without forcing a vertical scrollbar on launch.
  • Keep builds and tests isolated, require explicit deployment, and clarify where the generated executable goes.
  • Save build logs and keep Explorer-launched PowerShell windows open so failures remain visible.

SHA-256: 109166E5B50690570AF410F70C00A2402060C18F448C8A92347FE3B92959BEC7 (94,208 bytes)

v1.1.2

Choose a tag to compare

@AmrZriek AmrZriek released this 21 Sep 18:24

Logon startup no longer breaks when the file you launched EarGuard from is moved or deleted.

  • "Start with Windows" now registers a per-user copy at %LOCALAPPDATA%\EarGuard\EarGuard.exe instead of the folder you ran it from. Run it from Downloads or a USB stick, then clear that folder out - sign-in still launches EarGuard. Settings stay in %APPDATA%\EarGuard, so nothing about your configuration moves with it.
  • A task left pointing at a path that no longer exists is detected on the next launch and rewritten. Before this, the task kept firing at every logon and failed silently with 0x80070002.
  • Updating cannot repair a registration whose executable is already gone. If EarGuard stopped launching at sign-in for that reason, re-download and turn "Start with Windows" on again.
  • build.ps1 stops a running instance before compiling. The compiler cannot replace an executable it holds open, and the failed build could leave a truncated EarGuard.exe behind.
  • The tray icon keeps its EarGuard logo even in the exe-only installed copy (%LOCALAPPDATA%\EarGuard): the icon fallback now reads the logo embedded in the executable itself.

SHA-256: C3A7050104555BA5DE9EF588337CF64C3309F057CAFA8F8F9FB242CE5205572F (84,992 bytes)

v1.1.1

Choose a tag to compare

@AmrZriek AmrZriek released this 17 Sep 21:31

Protection could be undone by Windows itself

This is the release to install if you have ever taken a full-volume blast right after plugging in a dongle.

Windows restores an endpoint's previous volume a few hundred milliseconds after the device appears. EarGuard applied the plug-in limit once, at detection, so that restore simply overwrote it. Worse, if the restored value landed below your ceiling, nothing else caught it and the device stayed loud all session.

The plug-in limit now holds for three seconds after a device appears. Callbacks and the 100 ms watchdog keep pulling the level back down through that window, so late restores are covered as well. Resume from sleep renews the same window, and a disconnect and reconnect between scans no longer slips past it. After the three seconds your normal ceiling takes over, and a restored value below that ceiling is left alone.

Overlapping adjustments could undo a quieter setting

Every endpoint write now goes through one locked read-compare-write routine, so a watchdog tick, a hardware callback, and a change from the window cannot interleave and leave the louder value in place.

One device change used to cost about 30 rescans

A single hardware notification re-scanned every 100 ms for the whole three-second window. Each scan finished by writing settings.json and raising DevicesChanged, which rebuilt the device list in the window. One plug-in produced roughly 29 events and 29 file writes. Scans are now 500 ms apart, stop as soon as they find the endpoint, and publish only when the device set or the default endpoint actually changed.

Measured on real hardware, one notification that finds nothing new: 0 events, 0 writes (was 29 and 29). One that does find a late endpoint: 2 scans, both capped correctly.

Settings

  • Non-finite ceilings (NaN, ±Infinity) in settings.json are normalized instead of reaching the audio engine.
  • Null entries in the device list are dropped on load, so nothing downstream dereferences them.
  • Device names containing backslashes, quotes, or commas survive a save and reload.

Build fixes

  • csc @EarGuard.rsp failed for everyone. Forward slashes in the response file's globs made the compiler resolve src\Audio\*.cs against the current directory, so all 17 sources were reported missing. The globs use backslashes now.
  • The C# 5 compiler inside .NET Framework could not build the new result struct (CS0843), which broke the documented no-build-tools path. Fixed by using explicit readonly fields.
  • build.ps1 produces byte-identical binaries under Roslyn, so you can check a download against the hash below. The script passes /deterministic+ only when Roslyn is present, since the in-box compiler rejects the switch.

Removed

The Test Clamp button is gone. It raised volume 2% above your ceiling to prove the callback fired, and a tool built to protect your hearing should not write a louder value to your hardware. The README screenshot that advertised it has been replaced.

Install

Download EarGuard.exe below. Single portable executable, .NET Framework 4.8, no installer, no prerequisites. Run it, pick your DAC, set a ceiling.

SHA-256  f66267ab2e3a968013b84add6aab45f9b6586ad221f31cda3e82796c233aaa02
Size     82,432 bytes

EarGuard lowers endpoint volume above your limit; it cannot guarantee hearing safety. Brief spikes can get through before it responds. Keep your listening level low.

v1.1.0

Choose a tag to compare

@AmrZriek AmrZriek released this 10 Sep 11:51

The app got a lot of positive feedback, and some of it made me realize I could improve on it.

New in v1.1.0

  • Deterministic Windows startup. EarGuard registers a per-user Scheduled Task logon trigger (zero delay, least privilege, interactive session) instead of relying on Run-key ordering, so protection comes up as early as Windows allows. A one-time migration removes the legacy Run value. If task creation fails, the old registration stays, so auto-start is never lost. The in-app checkbox now reflects the real system state.
  • Tray icon that survives early launch. If EarGuard starts before Explorer, or Explorer restarts, the icon re-registers itself through the TaskbarCreated notification instead of disappearing.
  • Pro-audio worker path. A dedicated MMCSS-registered worker thread, plus a watchdog now firing every 100 ms instead of every 1000 ms.
  • Self-healing audio engine. Detects Windows Audio Service RPC and COM failures and resynchronizes itself (fast resync plus enumerator reinit). Newly plugged endpoints are capped on detection, with a retry to cover USB re-indexing races.
  • Wake-from-sleep protection. On resume, every guarded endpoint is pulled down to its Safe Plug-in volume.
  • Portable startup. The launch registration reconciles to the executable's current path on every start, runs as a standard user with no admin rights, and touches nothing else on the system.

Install

Download EarGuard.exe below. Single portable executable, .NET Framework 4.8, no installer, no prerequisites. Run it, pick your DAC, set your ceiling.

EarGuard lowers endpoint volume above your limit; it cannot guarantee hearing safety. Brief spikes can get through before it responds.

If it saved your eardrums or your IEMs, you can buy me a coffee: ko-fi.com/amrzriek

EarGuard v1.0.0

Choose a tag to compare

@AmrZriek AmrZriek released this 09 Sep 20:00

No installer or setup required. Download EarGuard.exe and run it.

Download

How to use

  1. Download EarGuard.exe from the Assets section below.
  2. Double-click it to launch.
  3. Pick your headphones or DAC dongle from the dropdown.
  4. Set a Hard Volume Ceiling (30%, say) and a Safe Plug-in Volume (5%).
  5. Optional: tick "Start with Windows" so it comes back on boot.
  6. Minimize to the tray.

What it does

  • Lowers endpoint volume that climbs above your ceiling, at the hardware endpoint rather than the player's own volume control.
  • Applies a 5% cap when a USB DAC is plugged in or the PC wakes from sleep, then releases to your ceiling.
  • Single 65 KB executable, no installer, no background services, no Electron.
  • Reads the real hardware device name, so you get Speakers (Realtek(R) Audio) instead of three identical "Speakers" entries.

What to expect

Volume writes happen through Windows CoreAudio as the change is reported, so enforcement is reactive: a brief spike can get through before EarGuard responds. It cannot guarantee hearing safety, and some devices and drivers limit how much it can do. Keep your listening level low as well.


Support

If EarGuard saved your eardrums or your IEMs, you can buy me a coffee: ko-fi.com/amrzriek