Skip to content

iarmankhan/audio-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Check

A lightweight macOS menu bar app that prevents accidental audio playback through your Mac's speakers when you meant to use your AirPods.

The Problem

You're in a quiet office or library, hit play on a video, and suddenly audio blasts through your MacBook speakers because your AirPods disconnected or weren't selected as the output device.

The Solution

Audio Check monitors your audio output and alerts you before playing audio through non-AirPods devices. When audio starts playing on speakers, it:

  1. Mutes immediately - No embarrassing audio leak
  2. Shows a dialog - Asking what you want to do
  3. Offers quick actions - Switch to AirPods, continue playing, or snooze alerts

Features

  • Menu Bar App - Lives in your menu bar, no dock icon
  • Real-time Monitoring - Detects audio output device changes instantly
  • Smart Alerts - Only triggers when audio actually starts playing
  • Quick Switch - One-click switch to AirPods from the alert or menu
  • Snooze - Temporarily disable alerts for 15 minutes
  • Battery Efficient - Uses CoreAudio event listeners, not polling
  • Native macOS - Built with Swift and SwiftUI

Screenshots

Menu Bar

AirPods Connected Speakers Active
Shows AirPods icon (green) Shows speaker icon (orange)

Alert Dialog

When audio plays on non-AirPods:

┌──────────────────────────────────────────────┐
│  ⚠️  Audio Output Warning                    │
│                                              │
│  Audio is playing through "MacBook Pro       │
│  Speakers" instead of Arman's AirPods Pro.   │
│                                              │
│  [Switch to AirPods] [Continue Playing] [Snooze 15 min]
└──────────────────────────────────────────────┘

Menu Dropdown

  • Current output device with status
  • Quick switch to AirPods button
  • Snooze status with end time
  • Protection toggle
  • Quit option

Requirements

  • macOS 14.0 (Sonoma) or later
  • Xcode 15.0 or later (for building)

Installation

Download

Download the latest release from the Releases page.

Build from Source

  1. Clone the repository:

    git clone https://github.com/yourusername/audio-check.git
    cd audio-check
  2. Open in Xcode:

    open audio-check.xcodeproj
  3. Build and run (⌘R)

How It Works

Audio Check uses macOS CoreAudio APIs to:

  1. Monitor default output device - Listens for kAudioHardwarePropertyDefaultOutputDevice changes
  2. Detect audio playback - Listens for kAudioDevicePropertyDeviceIsRunningSomewhere state changes
  3. Control system audio - Mutes/unmutes via kAudioDevicePropertyMute
  4. Switch output devices - Sets default output via kAudioHardwarePropertyDefaultOutputDevice

This event-driven approach means zero CPU usage when idle - the app only wakes when macOS notifies it of audio state changes.

Privacy & Permissions

  • No network access - Works completely offline
  • No data collection - Your audio habits stay on your device
  • No special permissions - Uses standard CoreAudio APIs

The app sandbox is disabled to allow CoreAudio device control, but no other system access is required.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Swift and SwiftUI
  • Uses macOS CoreAudio framework
  • Icon: SF Symbols

Made with care to save you from embarrassing audio moments.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages