Skip to content

feat(volume): volume group, monitors that change together - #3

Merged
muhep06 merged 7 commits into
mainfrom
feat/volume-group
Nov 11, 2026
Merged

muhep06 merged 7 commits into
mainfrom
feat/volume-group

Conversation

@muhep06

@muhep06 muhep06 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

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.

  • Settings: a Volume group switch, an In volume group switch per monitor, and the OSD choice (one indicator per monitor, or only on the audio monitor).
  • While the audio plays through a group monitor, the keys, the tray wheel and mute set every member to the same level on its own 0-100 scale (per-monitor maximum and curve still apply). A monitor at its top lets the others catch up.
  • With any other output (for example headphones) the keys behave as before. Tray sliders still move one monitor only.
  • A member that doesn't answer DDC is skipped (one warning in the log); the target keeps working.
  • Ctrl+Alt+G (Ctrl+Alt+Win+G with the other preset, or a recorded shortcut) turns the group on and off and shows a short message. It only takes the key when at least two monitors are in the group.
  • The OSD has one window per display, and the tray icon only follows the target.
  • Debug builds accept 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 build has no warnings in DisplayKnob.Core and dotnet test passes (200 tests, 18 new)
  • Docs updated (README, ROADMAP, TROUBLESHOOTING, CONTRIBUTING)

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.

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
muhep06 merged commit cf75ba1 into main Nov 11, 2026
1 check passed
@muhep06
muhep06 deleted the feat/volume-group branch November 11, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant