A native Windows 11 system-tray app that manages audio device priorities automatically. Rank your speakers, headphones, and microphones; the app keeps the highest-priority connected device as the Windows default, and switches when devices come and go.
This is a Windows rebuild of AudioPriorityBar, a macOS menu bar app with the same priority model.
- Priority-based auto-switching: when a higher-priority device connects, it becomes the Windows default for all roles (console, multimedia, and communications).
- Speaker and headphone modes: outputs are either speakers or headphones, each with its own priority list. Connecting a new headphone switches to headphone mode; unplugging the last one switches back to speakers.
- Headphone detection that works in any language: devices are classified by the form factor the driver reports (headphones or headset), with a name-keyword fallback. Localized names like "Fones de ouvido" still classify correctly.
- Manual mode: turns off auto-switching so you pick devices yourself.
- Device memory: remembers every device ever connected. Edit mode shows disconnected devices with "last seen" times, so you can rank them before they're plugged in.
- Ignore and never use: hide a device from one category, from both, or exclude it from auto-selection entirely.
- Drag to reorder: drag rows, or use Move up/Move down from the row menu.
- Volume: slider or mouse wheel (2% per notch) for the default output.
- Windows 11 design: Acrylic flyout, Fluent controls, light/dark and highlights that follow the Windows accent color, full keyboard operation, and a monochrome tray glyph that reflects mode, volume, and mute. See DESIGN.md.
- Start with Windows: per-user, and respects the toggle in Task Manager's startup apps.
Requires Windows 11 (Windows 10 is untested; it would lack the Acrylic backdrop).
Download AudioTraySetup-<version>-x64.exe (or -arm64.exe) from
Releases and run it. It installs per user (no admin
prompt) into %LOCALAPPDATA%\Programs\AudioTray, includes .NET, adds a Start menu entry, and
can start the app with Windows. Uninstall from Settings → Apps; your settings in
%LOCALAPPDATA%\AudioPriorityTray are kept. Tagged versions are stable; nightly tracks the
latest main. Builds are unsigned, so SmartScreen may warn on first run.
The portable AudioTray-win-*.exe on the same page needs the
.NET 10 Desktop Runtime.
Windows 11 puts new tray icons in the overflow (^) menu; drag it onto the taskbar, or enable it under Settings → Personalization → Taskbar → Other system tray icons.
Requires the .NET 10 SDK; the installer also needs Inno Setup 6,
and the Store package the Windows SDK (makeappx).
git clone https://github.com/rteoo/audio-tray.git
cd audio-tray
pwsh packaging/build.ps1 -Runtime win-x64This publishes a self-contained build and writes artifacts\installer\AudioTraySetup-<version>-x64.exe.
pwsh packaging/build.ps1 -Msix -IdentityName <name> -Publisher "CN=<id>" -PublisherDisplayName <publisher>
writes an unsigned artifacts\msix\AudioTray-<version>.0-<arch>.msix, using the identity values
from Partner Center → Product identity; Partner Center signs it on upload. CI builds it too when the
AUDIOPRIORITY_MSIX_IDENTITY_NAME, AUDIOPRIORITY_MSIX_PUBLISHER and
AUDIOPRIORITY_MSIX_PUBLISHER_DISPLAY_NAME repository variables are set (optionally
AUDIOPRIORITY_MSIX_DISPLAY_NAME if the reserved name isn't "AudioTray").
| Mode | Behavior |
|---|---|
| Speakers | Shows speaker devices; the top connected one is the default output |
| Headphones | Shows headphone devices; the top connected one is the default output |
| Manual | Shows all devices; click one to make it the default, no auto-switching |
Speakers and Headphones each keep their own microphone priority list and ignored microphones, so reordering mics in one mode never changes the other. Switching modes (including automatically, when headphones connect or disconnect) applies that mode's top microphone, except in Manual mode.
- Left-click the tray icon to open the flyout. Right-click for mode shortcuts, Sound settings, Start with Windows, and Quit.
- Click a device to move it to the top (automatic modes) or select it (Manual mode).
- Right-click a device, or use its ⋯ button, to move it between Speakers and Headphones, ignore it, reorder it, mark it Never use, or forget a disconnected device.
- Keyboard: Tab to a device, Enter to activate, Ctrl+Up/Down to reorder, Shift+F10 for its actions, Escape to close.
- Edit shows every device ever seen, including disconnected and ignored ones.
In automatic modes the app enforces the ranking: if something else changes the default device, the app switches back to the top-priority one. Use Manual mode to pick freely.
- Device discovery: Windows Core Audio (
IMMDeviceEnumerator) enumerates endpoints and notifies on connects, disconnects, and default changes. - Switching: the default endpoint is set through
IPolicyConfig, the long-stable interface every Windows audio switcher uses (Windows has no public API for it). - Storage: priorities, categories, and device memory live in
%LOCALAPPDATA%\AudioPriorityTray\settings.json, keyed by endpoint ID, which is stable across reconnects. Logs go toapp.login the same folder.
dotnet build AudioPriorityTray.slnx
dotnet test --project tests/AudioPriorityTray.Core.Tests
dotnet run --project src/AudioPriorityTraysrc/AudioPriorityTray.Core/ UI-free logic: AudioManager, SettingsStore, Core Audio interop
src/AudioPriorityTray/ WPF app: tray icon, flyout, view models
tests/AudioPriorityTray.Core.Tests/
See RELEASE-WINDOWS.md for the clean-checkout dry run, native Windows artifact preparation, hash verification, and required follow-up release gates.
MIT. See LICENSE.
