Skip to content
Background Music, a macOS audio utility: automatically pause your music, set individual apps' volumes and record system audio.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
BGM.xcworkspace Support creating .pkg installers using the debug build configuration. Jun 4, 2018
BGMApp Fix another crash when BGMDevice's volume is changed. Mar 28, 2019
BGMDriver Make builds more deterministic. Nov 12, 2018
Images Add an option to use a volume icon instead of the Background Music logo. Mar 4, 2019
SharedSource Add an option to use a volume icon instead of the Background Music logo. Mar 4, 2019
.editorconfig Add .editorconfig file to fix tab width on GitHub. Dec 27, 2017
.gitignore Add an option to use a volume icon instead of the Background Music logo. Mar 4, 2019
.travis.yml Update Travis CI builds to use Xcode 10.1. Mar 27, 2019 BGMDevice: Only enable volume/mute if the output device also has them. May 30, 2017 Add a volume slider for system sounds. Dec 26, 2017
LICENSE Initial commit Feb 19, 2016
LICENSE-Apple-Sample-Code Auto-pause: make the unpause delay proportional to the pause duration. Dec 28, 2016 Add some related projects to README and other minor doc clean up. Apr 23, 2016 Minor README change. Mar 23, 2019 Rename BGMDevice from "Background Music Device" to "Background Music". Jun 25, 2017 Clarify some comments in BGMPreferredOutputDevices. Oct 28, 2018 Split into an interactive and non-interactive version. Jun 17, 2017

Background Music

macOS audio utility

  • Automatically pauses your music player when other audio starts playing and unpauses it afterwards
  • Per-application volume, boost quiet apps
  • Record system audio

  • No restart required to install
  • Runs entirely in userspace


Version 0.2.0

BackgroundMusic-0.2.0.pkg (581 KB)

Still very much in alpha. Not code signed, so you'll have to right-click it and choose "Open".

Requires macOS 10.10+. Should work on 10.9, but I haven't tried it.

MD5: 23653c889f9ba7efc9cbb4e550c54060
SHA256: 78184ba743ba79e8cbd81bc8e2ea28b59100cc626ea77be58d6612bcfe2c7b78
PGP: sig, key (0595DF814E41A6F69334C5E2CAA8D9B8E39EC18C)

We also have snapshot builds.

Or install using Homebrew

brew cask install background-music

If you want the snapshot version:

brew tap homebrew/cask-versions
brew cask install background-music-pre

Auto-pause music

Background Music can pause your music player app when other audio starts playing and unpause it afterwards. The idea is that when I'm listening to music and pause it to watch a video or something I always forget to unpause it afterwards. So this keeps me from wearing headphones for hours listening to nothing.

So far iTunes, Spotify, VLC, VOX, Decibel, Hermes and Swinsian are supported. Adding support for a new music player should only take a few minutes1 -- see BGMMusicPlayer.h. If you don't know how to program, or just don't feel like it, create an issue and I'll try to add it for you.

App volumes

Background Music has a volume slider for each app running on the system. I mostly use this to boost quiet apps above their normal maximum volume.

Recording system audio

With Background Music running, open QuickTime Player and go File > New Audio Recording... (or movie/screen). Then click the arrow next to the record button that looks like and select Background Music as the input device.

You should be able to record system audio and a microphone together by creating an aggregate device that combines your input device (usually Built-in Input) with the Background Music device. You can create the aggregate device using the Audio MIDI Setup utility from /Applications/Utilities.

Install from source

Building should take less than a minute, but you'll need Xcode version 8 or higher.

If you're comfortable with it, you can just paste the following at a Terminal prompt.

(set -eo pipefail; URL=''; \
    cd $(mktemp -d); echo Downloading $URL to $(pwd); curl -qfL# $URL | gzcat - | tar x && \
    /bin/bash BackgroundMusic-master/ -w && rm -rf BackgroundMusic-master)

Otherwise, to build and install from source:

  • Clone or download the project.
  • If the project is in a zip, unzip it.
  • Open and change directory to the directory containing the project.
  • Run the following the command: /bin/bash

The script restarts the system audio process (coreaudiod) at the end of the installation, so you might want to pause any apps playing audio.

Additional detailed installation instructions can be found on the Wiki.


  • Run the script (using to remove Background Music from your system. You should be able to find it in /Applications/Background, but if not you can download the project again.
  • Go to the Sound section in System Preferences and change your default output device at least once. (If you only have one device now, either use Audio MIDI to create a temporary aggregate device, restart any audio apps that have stopped working or just restart your system.)

Manual Uninstall

Try following the instructions in if fails. (You might consider submitting a bug report, too.)


If Background Music crashes and your audio stops working, open the Sound panel in System Preferences and change your system's default output device to something other than the Background Music device. If it already is, it might help to change the default device and then change it back again.

Failing that, you might have to uninstall. Consider filing a bug report if you do.

Known issues

  • Setting an app's volume above 50% can cause clipping. Currently, the best solution is to instead set your overall volume to max and lower the volumes of other apps.

  • VLC automatically pauses iTunes/Spotify when it starts playing something, but that stops Background Music from unpausing your music afterwards. To workaround it, open VLC's preferences, click Show All, go Interface > Main interfaces > macosx and change Control external music players to either Do nothing or Pause and resume iTunes/Spotify.

    Similarly, Skype pauses iTunes during calls. If you want to disable that, uncheck Pause iTunes during calls on the General tab of Skype's preferences.

  • Plugging in or unplugging headphones when Background Music isn't running can silence system audio. To fix it, go to the Sound section in System Preferences, click the Output tab and change your default output device to something other than the Background Music device. Alternatively, you may Option+Click on the Sound icon in the menu bar to select a different output device.

    This happens when macOS remembers that the Background Music device was your default audio device the last time you last used (or didn't use) headphones.

  • A Chrome bug can stop Chrome from switching to the Background Music device after you open Background Music. Chrome's audio will still play, but Background Music won't be aware of it.

  • Some apps play notification sounds that are only just long enough to trigger an auto-pause. The only workaround right now is to increase the kPauseDelayNSec constant in That will make your music overlap the other audio for longer, though, so you don't want to increase it too much. See #5 for details.

  • Plenty more. Some are in listed in

Related projects

  • Core Audio User-Space Driver Examples The sample code from Apple that BGMDriver is based on.
  • Soundflower - "MacOS system extension that allows applications to pass audio to other applications."
  • WavTap - "globally capture whatever your mac is playing—-as simply as a screenshot"
  • eqMac, GitHub - "System-wide Audio Equalizer for the Mac"
  • llaudio - "An old piece of work to reverse engineer the Mac OSX user/kernel audio interface. Shows how to read audio straight out of the kernel as you would on Darwin (where most the OSX goodness is missing)"
  •, GitHub (Windows) - Auto-pause music
  • Jack OS X - "A Jack audio connection kit implementation for Mac OS X"
  • PulseAudio OS X - "PulseAudio for Mac OS X"
  • Sound Pusher - "Virtual audio device, real-time encoder and SPDIF forwarder for Mac OS X"
  • Zirkonium - "An infrastructure and application for multi-channel sound spatialization on MacOS X."


  • Audio Hijack - "Capture Audio From Anywhere on Your Mac"
  • Sound Siphon, Sound Control - System/app audio recording, per-app volumes, system audio equaliser
  • SoundBunny - "Control application volume independently."
  • Boom 2 - "The Best Volume Booster & Equalizer For Mac"


Copyright © 2016-2019 Background Music contributors. Licensed under GPLv2, or any later version.

Background Music includes code from:

[1] However, if the music player doesn't support AppleScript, or doesn't support the events Background Music needs (isPlaying, isPaused, play and pause), it can take significantly more effort to add. (And in some cases would require changes to the music player itself.)

You can’t perform that action at this time.