[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71553":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},71553,"BackgroundMusic","kyleneideck\u002FBackgroundMusic","kyleneideck","Background Music, a macOS audio utility: automatically pause your music, set individual apps' volumes and record system audio.","",null,"C++",19024,768,157,527,0,11,30,91,33,112.76,"GNU General Public License v2.0",false,"master",true,[27,28,29,30,31],"audio","audio-utility","cpp","macos","objective-c","2026-06-12 04:01:01","\u003C!-- vim: set tw=120: -->\n\n![](Images\u002FREADME\u002FFermataIcon.png)\n\n# Background Music\n##### macOS audio utility\n\n\u003Cimg src=\"Images\u002FREADME\u002FScreenshot.png\" width=\"340\" height=\"443\" \u002F>\n\n[Overview](#overview)\u003Cbr\u002F>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Auto-pause music](#auto-pause-music)\u003Cbr\u002F>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Application volume](#application-volume)\u003Cbr\u002F>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Recording system audio](#recording-system-audio)\u003Cbr\u002F>\n[Download](#download)\u003Cbr\u002F>\n[Run \u002F Configure](#run--configure)\u003Cbr\u002F>\n[Build and Install](#installing-from-source-code)\u003C\u002Fbr>\n[Uninstall](#uninstall)\u003Cbr\u002F>\n[Troubleshooting](#troubleshooting)\u003Cbr\u002F>\n[Related Projects](#related-projects)\u003Cbr\u002F>\n[License](#license)\u003Cbr\u002F>\n\n# Overview\n\n+ Automatically pause\u002Funpause your music player when other audio sources are playing\u002Fstopped\n+ Per-application volume control\n+ Record system audio\n+ No restart required to install\n\n##### *Note: Background Music is still in alpha.*\n\n## Auto-pause music\n\n**Background Music** automatically pauses your music player when a second audio source is playing and unpauses the player when the second source has stopped.\n\nThe auto-pause feature currently supports following music players:\n\n+ [iTunes](https:\u002F\u002Fwww.apple.com\u002Fitunes\u002F)\n+ [Spotify](https:\u002F\u002Fwww.spotify.com)\n+ [VLC](https:\u002F\u002Fwww.videolan.org\u002Fvlc\u002F)\n+ [VOX](https:\u002F\u002Fvox.rocks\u002Fmac-music-player)\n+ [Decibel](https:\u002F\u002Fsbooth.org\u002FDecibel\u002F)\n+ [Hermes](http:\u002F\u002Fhermesapp.org\u002F)\n+ [Swinsian](https:\u002F\u002Fswinsian.com\u002F)\n+ [GPMDP](https:\u002F\u002Fwww.googleplaymusicdesktopplayer.com\u002F)\n\nAdding support for a new music player is usually straightforward.\u003Csup id=\"a1\">[1](#f1)\u003C\u002Fsup> If you don't know how to program, or just don't feel\nlike it, feel free to [create an issue](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fissues\u002Fnew). Otherwise, see\n[BGMMusicPlayer.h](BGMApp\u002FBGMApp\u002FMusic%20Players\u002FBGMMusicPlayer.h).\n\n## Application volume\n\n**Background Music** provides a volume slider for each application running your system. You can boost quiet applications above their maximum volume.\n\n## Recording system audio\n\nYou can record system audio with **Background Music**. With **Background Music** running, launch **QuickTime Player** and select **File > New Audio Recording** (or **New Screen Recording**, **New Movie Recording**). Then click the dropdown menu (`⌄`) next to the record button and select **Background Music** as the input device.\n\nYou can record system audio and a microphone together by creating an [aggregate\ndevice](https:\u002F\u002Fsupport.apple.com\u002Fen-us\u002FHT202000) that combines your input device (usually Built-in Input) with\nthe **Background Music** device. You can create the aggregate device using the **Audio MIDI Setup** utility under\n***\u002FApplications\u002FUtilities***.\n\n# Download\n\n**Requires macOS 10.13+**.\n\nYou can download the current version of **Background Music** using the following options. We also have [snapshot builds](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Freleases).\n\n### Option 1\n\nDownload **version 0.4.3**:\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Freleases\u002Fdownload\u002Fv0.4.3\u002FBackgroundMusic-0.4.3.pkg\">\u003Cimg\nsrc=\"Images\u002FREADME\u002Fpkg-icon.png\" width=\"32\" height=\"32\" align=\"absmiddle\" \u002F>\nBackgroundMusic-0.4.3.pkg\u003C\u002Fa> (771 KB)\n\n> \u003Csub>MD5: 8c3bfe26c9cdf27365b9843f719ef188\u003C\u002Fsub>\u003Cbr\u002F>\n> \u003Csub>SHA256: c1c48a37c83af44ce50bee68879856c96b2f6c97360ce461b1c7d653515be7fd\u003C\u002Fsub>\u003Cbr\u002F>\n> \u003Csub>PGP:\n> [sig](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Freleases\u002Fdownload\u002Fv0.4.3\u002FBackgroundMusic-0.4.3.pkg.asc),\n> [key (0595DF814E41A6F69334C5E2CAA8D9B8E39EC18C)](https:\u002F\u002Fbearisdriving.com\u002Fkyle-neideck.gpg)\u003C\u002Fsub>\n\n### Option 2\n\nInstall using [Homebrew](https:\u002F\u002Fbrew.sh\u002F) by running the following command in **Terminal**:\n\n```bash\nbrew install --cask background-music\n```\n\n# Run \u002F Configure\n\nJust run `Applications > Background Music.app`! **Background Music** sets itself as your default output device under\n`System Settings > Sound` when it starts up (and sets it back on Quit).\n\n### Launch at Startup (Optional)\n\nAdd **Background Music** to `System Settings > General > Login Items`.\n\n# Installing from Source Code\n\n**Background Music** usually takes less than a minute to build. You need [Xcode](https:\u002F\u002Fdeveloper.apple.com\u002Fxcode\u002Fdownload\u002F) version\n10 or higher.\n\n### Option 1\n\n1. Open **Terminal**.\n2. Copy and paste the following command into **Terminal**:\n\n```shell\n(set -eo pipefail; URL='https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Farchive\u002Fmaster.tar.gz'; \\\n    cd $(mktemp -d); echo Downloading $URL to $(pwd); curl -qfL# $URL | gzcat - | tar x && \\\n    \u002Fbin\u002Fbash BackgroundMusic-master\u002Fbuild_and_install.sh -w && rm -rf BackgroundMusic-master)\n```\n\n\u003Cdetails>\u003Csummary>More info...\u003C\u002Fsummary>\n\nThis command uses `\u002Fbin\u002Fbash` instead of `bash` in case someone has a nonstandard Bash in their `$PATH`. However, it doesn't do this for `tar` or `curl`. In addition, `build_and_install.sh` doesn't call programs by absolute paths. This command also uses `gzcat - | tar x` instead of `tar xz` because `gzcat` will also check the file's integrity (gzip files\ninclude a checksum), and will ensure that a half-downloaded copy of `build_and_install.sh` doesn't run.\n\n\u003C\u002Fdetails>\n\n### Option 2\n\n1. Clone or [download](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Farchive\u002Fmaster.zip) the project.\n2. If the project is in a zip, unzip it.\n3. Open **Terminal** and [change the directory](https:\u002F\u002Fgithub.com\u002F0nn0\u002Fterminal-mac-cheatsheet#core-commands) to the\n   directory containing the project.\n4. Run: `\u002Fbin\u002Fbash build_and_install.sh`.\n\nThe script restarts the system audio process (coreaudiod) at the end of the installation, so pause any applications\nplaying audio if you can.\n\nTo manually build and install, see [MANUAL_INSTALL.md](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fblob\u002Fmaster\u002FMANUAL-INSTALL.md).\n\n# Uninstall\n\nTo uninstall **Background Music** from your system, follow these steps:\n\n1. Open **Terminal**.\n2. To locate `uninstall.sh`, run: `cd \u002FApplications\u002FBackground\\ Music.app\u002FContents\u002FResources\u002F`.\n3. Run: `bash uninstall.sh`.\n\nIf you cannot locate `uninstall.sh`, you can [download the project](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Farchive\u002Fmaster.zip) again.\n\nTo manually uninstall, see [MANUAL_UNINSTALL.md](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fblob\u002Fmaster\u002FMANUAL-UNINSTALL.md).\n\n# Troubleshooting\n\nIf Background Music crashes and your audio stops working, open `System Settings > Sound` and change your\nsystem's default output device to something other than the **Background Music device**. If it already is, then\nchange the default device and then change it back again.\n\nMake sure you allow \"microphone access\" when you first run Background Music. If you denied it, go to\n`System Settings > Security & Privacy > Privacy > Microphone`, find Background Music in the list\nand check the box next to it. Background Music doesn't actually listen to your microphone. It needs\nthe permission because it gets your system audio from its virtual input device, which macOS counts\nas a microphone. (We're working on it in [#177](\u002F..\u002F..\u002Fissues\u002F177).)\n\nIf the volume slider for an app isn't working, try looking in `More Apps` for entries like `Some\nApp (Helper)`. For some meeting or video chat apps, you may need to do this to change the current\nmeeting volume.\n\n## Known issues and solutions\n\n- **Setting an application's volume above 50% can cause [clipping](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FClipping_(audio)).**\n\n    - Set your volume to its maximum level and lower the volumes of other applications.\n\n- **Only 2-channel (stereo) audio devices are currently supported for output.**\n\n- **VLC pauses iTunes or Spotify when playing, and stops Background Music from unpausing your music afterward.**\n\n    - Under VLC's preferences, select **Show All**. Navigate to **Interface > Main interfaces > macosx** and change *Control external music players* to either *Do nothing* or *Pause and resume iTunes\u002FSpotify*.\n\n- **Skype pauses iTunes during calls.**\n\n    - To disable this, uncheck *Pause iTunes during calls* on the **General** tab of **Skype**'s preferences.\n\n- **Plugging in or unplugging headphones when Background Music isn't running causes silence in the system audio.**\n    - Navigate to **System Settings > Sound**. Click the **Output** tab and change your default output device to something other than the **Background Music** device. Alternatively, press **Option + Click** on the sound icon within 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 used (or didn't use) headphones.\n\n- **[A Chrome bug](https:\u002F\u002Fbugs.chromium.org\u002Fp\u002Fchromium\u002Fissues\u002Fdetail?id=557620) stops Chrome from switching to the Background Music device after you open Background Music.**\n    - Chrome's audio will still play, but **Background Music** won't be aware of it.\n\n- **Some applications play notification sounds that are only just long enough to trigger an auto-pause.**\n    - Increase the `kPauseDelayNSec` constant in [BGMAutoPauseMusic.mm](\u002FBGMApp\u002FBGMApp\u002FBGMAutoPauseMusic.mm). It will increase your music's overlap time over other audio, so don't increase it too much. See [#5](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fissues\u002F5) for details.\n\nMany other issues are listed in [TODO.md](\u002FTODO.md) and in [GitHub\nIssues](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fissues).\n\n# Related projects\n\n- [Core Audio User-Space Driver\n  Examples](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fmac\u002Fsamplecode\u002FAudioDriverExamples\u002FIntroduction\u002FIntro.html)\n  The sample code from Apple that BGMDriver is based on.\n- [Soundflower](https:\u002F\u002Fgithub.com\u002Fmattingalls\u002FSoundflower) - \"MacOS system extension that allows applications to pass\n  audio to other applications.\"\n- [WavTap](https:\u002F\u002Fgithub.com\u002Fpje\u002FWavTap) - \"globally capture whatever your mac is playing—-as simply as a screenshot\"\n- [eqMac](http:\u002F\u002Fwww.bitgapp.com\u002Feqmac\u002F), [GitHub](https:\u002F\u002Fgithub.com\u002Fnodeful\u002FeqMac2) - \"System-wide Audio Equalizer for the Mac\"\n- [llaudio](https:\u002F\u002Fgithub.com\u002Fmountainstorm\u002Fllaudio) - \"An old piece of work to reverse engineer the Mac OSX\n  user\u002Fkernel audio interface. Shows how to read audio straight out of the kernel as you would on Darwin (where most the\n  OSX goodness is missing)\"\n- [mute.fm](http:\u002F\u002Fwww.mutefm.com), [GitHub](https:\u002F\u002Fgithub.com\u002Fjaredsohn\u002Fmutefm) (Windows) - Auto-pause music\n- [Jack OS X](http:\u002F\u002Fwww.jackosx.com) - \"A Jack audio connection kit implementation for Mac OS X\"\n- [PulseAudio OS X](https:\u002F\u002Fgithub.com\u002Fzonque\u002FPulseAudioOSX) - \"PulseAudio for Mac OS X\"\n- [Sound Pusher](https:\u002F\u002Fgithub.com\u002Fq-p\u002FSoundPusher) - \"Virtual audio device, real-time encoder and SPDIF forwarder for\n  Mac OS X\"\n- [Zirkonium](https:\u002F\u002Fcode.google.com\u002Farchive\u002Fp\u002Fzirkonium) - \"An infrastructure and application for multi-channel sound\n  spatialization on MacOS X.\"\n- [BlackHole](https:\u002F\u002Fgithub.com\u002FExistentialAudio\u002FBlackHole) - \"a modern macOS virtual audio driver that allows applications to pass audio to other applications with zero additional latency.\"\n\n### Non-free\n\n- [Audio Hijack](https:\u002F\u002Frogueamoeba.com\u002Faudiohijack\u002F), [SoundSource](https:\u002F\u002Frogueamoeba.com\u002Fsoundsource\u002F) - \"Capture\n  Audio From Anywhere on Your Mac\", \"Get truly powerful control over all the audio on your Mac!\"\n- [Sound Siphon](https:\u002F\u002Fstaticz.com\u002Fsoundsiphon\u002F), [Sound Control](https:\u002F\u002Fstaticz.com\u002Fsoundcontrol\u002F) - System\u002Fapp audio recording, per-app volumes, system audio equaliser\n- [SoundBunny](https:\u002F\u002Fwww.prosofteng.com\u002Fsoundbunny-mac-volume-control\u002F) - \"Control application volume independently.\"\n- [Boom 2](https:\u002F\u002Fwww.globaldelight.com\u002Fboom\u002F) - \"The Best Volume Booster & Equalizer For Mac\"\n\n## License\n\nCopyright © 2016-2024 [Background Music contributors](https:\u002F\u002Fgithub.com\u002Fkyleneideck\u002FBackgroundMusic\u002Fgraphs\u002Fcontributors).\nLicensed under [GPLv2](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-2.0.html), or any later version.\n\n**Background Music** includes code from:\n\n- [Core Audio User-Space Driver\n  Examples](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fmac\u002Fsamplecode\u002FAudioDriverExamples\u002FIntroduction\u002FIntro.html), [original\n  license](LICENSE-Apple-Sample-Code), Copyright (C) 2013 Apple Inc. All Rights Reserved.\n- [Core Audio Utility\n  Classes](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fcontent\u002Fsamplecode\u002FCoreAudioUtilityClasses\u002FIntroduction\u002FIntro.html),\n  [original license](LICENSE-Apple-Sample-Code), Copyright (C) 2014 Apple Inc. All Rights Reserved.\n\n----\n\n\u003Cb id=\"f1\">[1]\u003C\u002Fb> However, if the music player doesn't support AppleScript, or doesn't support the events Background\nMusic needs (`isPlaying`, `isPaused`, `play` and `pause`), it can take significantly more effort to add. (And in some\ncases would require changes to the music player itself.) [↩](#a1)\n\n\n","Background Music 是一个 macOS 音频实用工具，能够自动暂停音乐、设置单个应用程序的音量以及录制系统音频。其核心功能包括自动暂停\u002F恢复音乐播放器（支持 iTunes、Spotify 等多种音乐播放软件），为每个运行中的应用提供独立的音量控制滑块，并且可以无重启安装。此外，用户还可以通过 QuickTime Player 录制系统音频或与麦克风一起录音。该项目采用 C++ 和 Objective-C 开发，适合需要在不同应用场景下灵活管理音频输出的 macOS 用户使用，例如在视频会议时降低背景音乐音量而不影响其他声音输出，或者进行屏幕录制时捕捉系统音频。",2,"2026-06-11 03:38:30","high_star"]