Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioClick 🔊

One-click macOS audio device switcher — from your menu bar.
菜单栏一键切换 macOS 音频输出设备。

Install Stars MIT
macOS Python

Menu Notification


✨ 功能 / Features

中文 English
🔊 菜单栏显示当前音频输出设备 Show current audio output in menu bar
🔄 点击即可切换设备 One-click device switching
🎤 显示所有输出/输入设备 List all output & input devices
🔷 蓝牙/AirPlay/HDMI/USB 设备识别 Bluetooth, USB, HDMI, AirPlay detection
实时刷新(每 5 秒) Auto-refresh every 5 seconds

🚀 快速开始 / Quick Start

安装 / Install

# 克隆仓库
git clone https://github.com/Monah-Limited/AudioClick.git
cd AudioClick

# 安装依赖
pip install -r requirements.txt

# 运行
python src/audioclick.py

使用 / Usage

  1. 运行后在菜单栏看到 🔊 图标
  2. 点击展开设备列表
  3. ★ 标记当前设备
  4. 点击任意设备 → 立即切换

📸 截图 / Screenshots

Menu dropdown Switch notification

Architecture


🔧 工作原理 / How It Works

AudioClick 使用 macOS 的 CoreAudio 原生 API(而非 AppleScript),通过 AudioHardwareGetProperty / AudioHardwareSetProperty 直接枚举和切换音频设备。

AudioClick (rumps) → CoreAudio API → macOS Audio System → New Device Active

优点:

  • 毫秒级切换 — 比打开系统偏好设置快 100 倍
  • 🔒 原生 API — 不依赖第三方工具
  • 📋 完整设备信息 — 名称、传输类型(USB/BT/HDMI)

🙏 Credits / 致谢

Project Role
rumps macOS menu bar framework
pyobjc-framework-CoreAudio macOS CoreAudio Python bindings
Pillow Icon generation
Apple CoreAudio macOS audio device enumeration API

🧠 "30 Apps in 100 Days"

Day 3 of 30 Apps in 100 Days.


📄 许可证 / License

MIT

#macOS #audio #menu-bar #coreaudio #python #opensource #utility

About

macOS menu-bar audio device switcher; one-click toggle speakers, headphones, AirPods.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages