Skip to content

feat: keep a separate microphone profile per output mode - #41

Closed
rteoo wants to merge 16 commits into
tobi:mainfrom
rteoo:feat/per-mode-microphones
Closed

rteoo wants to merge 16 commits into
tobi:mainfrom
rteoo:feat/per-mode-microphones

Conversation

@rteoo

@rteoo rteoo commented Sep 28, 2026

Copy link
Copy Markdown

Summary

  • Speakers and Headphones modes now each keep their own microphone order and ignored mics. Before, both modes shared one list, so ranking the headset mic for headphones also moved it in speaker mode.
  • Every mode change (manual, automatic on headphone connect/disconnect, first-run adoption) re-reads the mic list and applies that mode's top microphone.
  • Existing settings seed both profiles from the old shared list, so upgrading changes nothing until the user reorders.

Testing

  • dotnet build AudioPriorityTray.slnx: 0 warnings.
  • dotnet test --project tests/AudioPriorityTray.Core.Tests: 37/37 pass. Of the 4 new tests, 3 fail against the old code; the legacy-settings migration test passes on both.
  • Not exercised in the running tray app against real devices.

Risks

  • Settings gain headphoneInputPriorities and hiddenHeadphoneMics; older app versions ignore them and keep using the speaker-mode list.

rteoo and others added 16 commits September 26, 2026 11:31
Port the macOS menu bar app to Windows as a C#/.NET 10 WPF tray app
with the built-in Fluent theme: Acrylic flyout, Quick Settings style
mode tiles, and a monochrome tray glyph that reflects mode and volume.

Audio goes straight through Windows Core Audio COM interop; the
default device is switched via IPolicyConfig. No third-party runtime
dependencies. The priority and auto-switch logic lives in a UI-free
Core library covered by xUnit tests.

Windows-specific behavior beyond the port:
- classify headphones by endpoint form factor, so localized device
  names (e.g. "Fones de ouvido") are detected
- on first run, start in the mode of the current output instead of
  switching away from a headset in use
- reordering visible devices keeps the saved rank of unplugged ones
- clicking a device in automatic mode promotes it, as documented

The original Swift sources stay in AudioPriorityBar/ as reference.
The Windows app replaces it. Drops the Swift sources, Xcode project,
build script, macOS screenshot, and the release workflow, which built
the Xcode project and would fail without it. The original lives on
upstream and in this repo's history.
feat: rebuild as a native Windows 11 tray app
A ContextMenu inherits font properties from its placement target, so
menus opened from icon buttons rendered every label in Segoe Fluent
Icons (boxes). Menus now set the UI font explicitly. Checked entries
are also marked checkable, which the Fluent MenuItem template needs to
draw the check.
- Tint the transient Acrylic backdrop with the theme canvas color, as
  Windows' own flyouts do; raw DWM Acrylic measured #545454 over bright
  windows, now tobi#26-#2B in dark and #E3-#E8 in light.
- Highlight the active device with an accent pill plus a backplate of
  the Windows accent color (SystemColors.AccentColor), instead of a
  neutral fill.
- Make rows keyboard operable (Enter, Up/Down, Ctrl+Up/Down to reorder,
  Shift+F10 for actions), keep the row actions button always visible,
  and restore 2px focus rings on custom templates.
- Mode tiles become a radio group; Comfortable density (44px rows, 40px
  targets); spacing and type on the system's scales; entrance motion on
  the system curve, skipped when Windows animations are off.
- Record the adoption and its exceptions in DESIGN.md.
Builds and tests on every PR and push. Pushes to main replace a rolling
"nightly" pre-release; v* tags publish a versioned release with the tag
as the app version. Ships framework-dependent single-file exes for
win-x64 and win-arm64. Releases use the gh CLI on the runner instead of
a third-party action.
feat: adopt Windows Design System, fix menus, add CI releases
Creating a release in the GitHub UI pushes its tag, which triggered a
run whose `gh release create` failed because the release existed. The
step now uploads to an existing release and only creates one otherwise.
ci: attach assets when the tagged release already exists
- packaging/build.ps1 publishes a self-contained build per architecture
  and compiles an Inno Setup installer: per-user (no admin), stable
  AppId for in-place upgrades, optional Start-with-Windows task that
  writes the same Run value as the app's toggle, removed on uninstall.
- With -Msix it packs an unsigned MSIX for Partner Center from
  AppxManifest.xml (runFullTrust, opt-in startupTask, x.y.z.0 version)
  using identity values passed in or read from AUDIOPRIORITY_MSIX_*.
- Packaged builds can't use the Run key, so the menu opens Windows'
  Startup apps settings instead.
- CI attaches x64/arm64 installers to releases and uploads the MSIX as
  an artifact when the Store identity repository variables are set.

Mirrors the installer and Store packaging used by sniptype and snipvoice.
feat: add a per-user installer and Microsoft Store package
Match the Microsoft Store reservation (Strateo.AudioTray). User-facing
names change: window title, tray menu, error dialog, exe description,
installer name, Start menu group, default install folder, and release,
installer and MSIX file names.

Internal identifiers stay: the exe name, mutex, Run value, settings
folder and installer AppId, so v1.0.0 installs upgrade in place and
keep their settings and start-with-Windows entry. The installer removes
the old "Audio Priority" Start menu group and desktop shortcut.
chore: rename the app to AudioTray
The upload and the release job's download are renamed together; the
artifact kept the pre-rename name.
ci: rename the build artifact to AudioTray
Speaker and headphone modes shared one microphone order, so ranking the headset mic for headphones also moved it in speaker mode. Each mode now has its own mic order and ignored mics; switching modes re-applies that mode's top mic. Existing settings seed both profiles from the old shared list.
@rteoo rteoo closed this Sep 28, 2026
@rteoo

rteoo commented Sep 28, 2026

Copy link
Copy Markdown
Author

Sorry, Claude's fault!

@rteoo
rteoo deleted the feat/per-mode-microphones branch September 28, 2026 21:46
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