A lightweight macOS menu bar application for quickly switching audio output devices.
- Menu Bar Integration - Lives in your menu bar, no Dock icon clutter
- Floating HUD Window - Always-on-top widget in the corner of your screen
- One-Click Switching - Switch audio output devices instantly
- Real-time Updates - Automatically detects when audio devices are connected or disconnected
- Smart Icons - Automatically displays appropriate icons for AirPods, headphones, speakers, etc.
- Multi-Space Support - HUD window visible across all desktop spaces
- Draggable Window - Position the HUD anywhere you like
- Native Performance - Built with SwiftUI and Core Audio API, minimal resource usage
| Collapsed | Expanded |
|---|---|
![]() |
![]() |
-
Download the latest
.dmgor.zipfrom Releases -
Extract and move
AudioSwitch.appto your/Applicationsfolder -
Important: Bypass Gatekeeper (required for unsigned apps)
Since this app is not signed with an Apple Developer certificate, macOS will block it by default. To open it:
Method A: Right-click to Open (Recommended)
- Right-click (or Control-click) on
AudioSwitch.app - Select "Open" from the context menu
- Click "Open" in the dialog that appears
- You only need to do this once
Method B: System Settings
- Try to open the app (it will be blocked)
- Go to System Settings > Privacy & Security
- Scroll down to find the message about AudioSwitch being blocked
- Click "Open Anyway"
- Enter your password if prompted
Method C: Terminal Command
xattr -cr /Applications/AudioSwitch.app
Then open the app normally.
- Right-click (or Control-click) on
- Clone this repository
git clone https://github.com/loserxiong/AudioSwitch.git
- Open
AudioSwitch.xcodeprojin Xcode - Build and run (⌘R)
- Left-click menu bar icon → Show quit menu
- Right-click menu bar icon → Toggle HUD window visibility
- Click chevron in HUD → Expand/collapse device list
- Click device in list → Switch to that audio output
- Drag HUD background → Move window position
- macOS 11.0 (Big Sur) or later
- Apple Silicon or Intel Mac
- Swift & SwiftUI
- AppKit (for menu bar and window management)
- Core Audio API (for audio device control)
- Combine (for reactive updates)
MIT License - feel free to use and modify.
一款轻量级的 macOS 菜单栏应用,用于快速切换音频输出设备。
- 菜单栏集成 - 常驻菜单栏,不占用 Dock 空间
- 浮窗 HUD - 始终置顶的小窗口,显示在屏幕角落
- 一键切换 - 点击即可立即切换音频输出设备
- 实时更新 - 自动检测音频设备的连接和断开
- 智能图标 - 自动为 AirPods、耳机、扬声器等设备显示对应图标
- 多桌面支持 - HUD 窗口在所有桌面空间都可见
- 可拖拽窗口 - 将 HUD 放置在任意位置
- 原生性能 - 使用 SwiftUI 和 Core Audio API 构建,资源占用极低
| 收起状态 | 展开状态 |
|---|---|
![]() |
![]() |
-
从 Releases 下载最新的
.dmg或.zip文件 -
解压并将
AudioSwitch.app移动到/Applications(应用程序)文件夹 -
重要:绕过安全验证(未签名应用必需)
由于此应用没有 Apple 开发者签名,macOS 默认会阻止打开。请按以下方法操作:
方法 A:右键打开(推荐)
- 在
AudioSwitch.app上点击右键(或按住 Control 点击) - 从菜单中选择「打开」
- 在弹出的对话框中点击「打开」
- 只需操作一次,之后可正常打开
方法 B:系统设置
- 尝试打开应用(会被阻止)
- 前往 系统设置 > 隐私与安全性
- 向下滚动,找到关于 AudioSwitch 被阻止的提示
- 点击「仍要打开」
- 如有提示,输入密码确认
方法 C:终端命令
xattr -cr /Applications/AudioSwitch.app
然后正常打开应用即可。
- 在
- 克隆此仓库
git clone https://github.com/loserxiong/AudioSwitch.git
- 用 Xcode 打开
AudioSwitch.xcodeproj - 编译并运行(⌘R)
- 左键点击 菜单栏图标 → 显示退出菜单
- 右键点击 菜单栏图标 → 显示/隐藏 HUD 窗口
- 点击箭头 → 展开/收起设备列表
- 点击设备 → 切换到该音频输出设备
- 拖拽 HUD 背景 → 移动窗口位置
- macOS 11.0 (Big Sur) 或更高版本
- Apple Silicon 或 Intel Mac
- Swift & SwiftUI
- AppKit(菜单栏和窗口管理)
- Core Audio API(音频设备控制)
- Combine(响应式更新)
MIT License - 可自由使用和修改。
Issues and Pull Requests are welcome!
Built with SwiftUI and Core Audio API.

