lx-s / WinMute

WinMute lets you automatically mute your PC volume on certain events (e. g. Screensaver, Workstation Lock, Shutdown, etc.).
BSD 3-Clause "New" or "Revised" License
168 stars 6 forks source link

Never unmutes if reboot before quite hours ends #22

Closed VorlonCD closed 1 year ago

VorlonCD commented 1 year ago

My quite hours are set to end at 8:30 am. If I happen to reboot before 8:30, my machine stays muted until I manually unmute.

So maybe:

If app Initializing AND QuiteHours is enabled AND NOT IsQuietTime AND IsMuted: Unmute

You would have had a pull request if it was in C# :)

Great little program! I had been using Volume² before I found this gem but its not open source and I believe its author is Russian.

lx-s commented 1 year ago

Thanks! I'll get on it within the next few days :)

lx-s commented 1 year ago

Sorry for taking this long. I just noticed that this bug comes from a hen-egg type situation.

WinMute notes all audio endpoints mute states upon startup, so when the PC boots and all audio endpoints are muted (from a previous quiet hours start) than WinMute saves that. When quiet hours end, all endpoints are restored to the saved state, which means, that they are "restored" to their muted state. So in that specific case they are not restored at all, from a user perspective.

To circumvent that problem you can set the following option:

grafik

I fear that there is no better way, since -in that case- WinMute has no way of knowing if the mute state was set by itself or by another program or by the user.

VorlonCD commented 1 year ago

Thanks! I've had that setting on for a while and haven't noticed the issue.