Repository navigation
feat(volume): volume group, monitors that change together - #3
Merged
Merged
Conversation
muhep06
added a commit
that referenced
this pull request
Nov 11, 2026
The tests sent the second write as soon as the first one was seen. On a slow runner the worker had already armed its "writes stopped" timer, so the test moved the manual clock past the second write's spacing before the worker looked at it. The monitor then never dropped the write, nothing was learned and the test timed out after 10 s. Hold the first write inside the fake monitor and queue the second one behind it, so only the worker's own timers move the clock between them. This was failing the CI run on `main` after #2 and on #3. Under the load that used to fail it (6 parallel test processes, 5 runs each) it passed 30 of 30 locally.
A volume group lets several monitors change volume together. Store the group switch, where its OSD appears, and which monitors belong to the group. Settings files from older versions load with the group off.
While the audio plays through a monitor of the group, the volume keys, the tray wheel and mute set every member to the same level on its own 0-100 scale, so a monitor at its top lets the others catch up. A member that doesn't answer DDC is skipped and logged once; the target keeps working. Slider changes still move one monitor. VolumeController keeps one state per monitor key instead of a single one, and takes the MonitorRegistry to find the members. A new ToggleGroup command flips the group and raises VolumeGroupToggled.
Ctrl+Alt+G (Ctrl+Alt+Win+G with the other preset, or a recorded one) turns the volume group on and off. The hook only takes the key while at least two monitors are in the group, so it otherwise reaches the focused application, and a held key doesn't toggle again. Unlike the volume shortcuts, a declined toggle injects no Windows volume key.
The OSD gets one window per display, so every monitor of the group shows its own level, or only the audio monitor does, as chosen in settings. Turning the group on or off shows a short message. The tray icon only follows the target, so an update from another member doesn't blank it.
Add the group switch and the choice of OSD to the volume keys section, an "In volume group" switch to every monitor, and the toggle shortcut to the custom shortcuts.
DISPLAYKNOB_FAKE_MONITORS=<n> adds n simulated DDC monitors next to the real ones, so features that need several monitors can be tried on a machine with one. They keep their values in memory and change nothing on the hardware. Debug builds only.
Add it to the README features and the roadmap, and explain in the troubleshooting guide why a monitor may not follow the group.
muhep06
force-pushed
the
feat/volume-group
branch
from
November 11, 2026 20:12
30e55cb to
6acb652
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today the volume keys control only the monitor Windows' default audio output plays through. This adds a volume group: choose the monitors (for example 2 of 3) that change together.
DISPLAYKNOB_FAKE_MONITORS=<n>to add simulated monitors, for trying this on a machine with one monitor.The work is split into seven commits, each of which builds and passes the tests on its own (settings, volume controller, shortcut, OSD, settings UI, fake monitors, docs). Merge it with rebase so they stay separate.
Checklist
dotnet buildhas no warnings inDisplayKnob.Coreanddotnet testpasses (200 tests, 18 new)Tested on hardware
Samsung S34C65xU plus two simulated monitors (
DISPLAYKNOB_FAKE_MONITORS=2): settings, keys, mute, the toggle shortcut and the OSD work. Not tried with two real DDC monitors, so the per-monitor OSD on separate displays is untested.