Skip to content

Latest commit

 

History

10 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

SoundOrder

SoundOrder app icon

SoundOrder is a native macOS menu-bar app that automatically selects audio input and output devices according to your preferred order. It is designed for moving between desks, docks, speakers, microphones, and headphones without reconfiguring macOS sound settings every time.

Features

  • Independent priority lists for input and output devices.
  • Automatic switching when devices connect or disconnect.
  • Temporary manual overrides from the menu bar.
  • Per-device output volumes that are saved and restored.
  • Disabled devices that are never selected automatically.
  • Disconnected devices that retain their priority and volume settings.
  • Built-in input and output devices used as final fallbacks.
  • Output and system-sound destinations kept in sync.
  • Clear indication of input-only and output-only devices.
  • Fixed-volume outputs shown without non-functional controls.
  • Optional Launch at Login support.

Everyday use cases

  • Retire the mystery outputs. Disable the audio device exposed by your monitor, or the surprise output on a USB microphone that exists because it has a 3.5 mm jack. Thanks, but no thanks.
  • Let the nice speakers win. Put your desk speakers above the MacBook speakers and enjoy the radical luxury of hearing the better device.
  • Headphones first, when present. Give headphones top priority so private conversations stay private, then fall back automatically when they leave.
  • Make a quick escape. Override the automatic choice from the menu whenever the moment calls for another device, then resume automatic selection with one click.

Menu-bar controls

The menu shows the active output and input devices, their current selection mode, and all available alternatives. Output volume can be adjusted without opening System 设置.

SoundOrder menu-bar controls

Selecting a device manually creates a temporary override. SoundOrder keeps that device selected until it disconnects or you choose Resume Automatic Selection.

SoundOrder with a manual output override

Device priorities

Open 设置 to drag input and output devices into priority order. SoundOrder selects the highest available device in each list.

The 设置 window also lets you:

  • Set and preview the preferred volume for each controllable output.
  • Disable devices that should never be selected automatically.
  • Identify whether disabled devices provide input, output, or both.
  • Restore disabled devices to their priority list.
  • Keep disconnected devices in the desired position for their next connection.
  • Enable or disable Launch at Login.

SoundOrder device priority settings

How automatic selection works

SoundOrder evaluates input and output devices independently:

  1. The first connected, enabled device in the relevant priority list is selected.
  2. If no preferred external device is available, SoundOrder falls back to the built-in device.
  3. When a higher-priority device becomes available, SoundOrder switches to it and restores its saved output volume.
  4. A manual menu selection pauses automatic switching for that direction until the override is cleared or the selected device disappears.

新建ly discovered devices are added above the built-in fallback. Their position is retained even while they are disconnected.

Requirements

  • macOS 26.0 or later.
  • Xcode 26 or a compatible Swift 6.3 toolchain.
  • Xcode Command Line Tools.

Build and run

From the repository root:

make run

This builds the release executable, creates an ad-hoc signed app at build/SoundOrder.app, and opens it.

To build without launching:

make bundle

Install

Install SoundOrder for the current user:

make install

The app is installed at ~/Applications/SoundOrder.app and opened automatically. Running the command again replaces the existing installation.

The locally built app is ad-hoc signed. It is not Developer ID signed or notarized for distribution to other Macs.

Usage

  1. Start SoundOrder and open 设置 from its menu-bar panel.
  2. Drag output and input devices into the preferred order.
  3. Adjust the saved volume beneath each controllable output.
  4. Disable devices that should not be selected.
  5. Close 设置 and let SoundOrder switch devices automatically.
  6. Select a device from the menu when a temporary override is needed.
  7. Choose Resume Automatic Selection to return to priority-based routing.

Development

Command Purpose
make build Build the Swift package.
make bundle Build and ad-hoc sign build/SoundOrder.app.
make run Bundle and launch SoundOrder.
make install Install and launch the app from ~/Applications.
make test Run the test suite.
make lint Check Swift formatting.
make diagnose Print Core Audio devices and defaults without changing them.
make icon Regenerate the PNG iconset and .icns from the SVG source.

The project contains three Swift targets:

  • SoundOrderKit implements Core Audio access, selection policy, preferences, volume restoration, and Launch at Login.
  • SoundOrderApp provides the SwiftUI menu-bar and 设置 interface.
  • soundorder-diagnose is a read-only Core Audio diagnostic executable.

Current limitations

  • Per-application volume control is not implemented. It requires a separate Core Audio process-tap and mixing architecture.
  • SoundOrder can save volume only for devices whose main output volume is writable through Core Audio.
  • The current build and installation workflow is intended for local development rather than public distribution.

The proposed per-application volume phase is documented in docs/plans/2026-07-24-soundorder-design.md.

关于

Prioritize macOS audio I/O sources

Resources

Stars

0 stars

关注者

0 watching

复刻s

发布

贡献者

Languages