19

I often listern to music on my macBook - when I unplug my headphones occasionaly forget to mute the speaker - so the whole office gets an earfull. How can I set my mac to be muted unless headphones are plugged in. I'm interested to know if I can simply deactivate the built in speakers...

This has become more obvious recently when I use a bluetooth headset or similar - I walk away from the machine forgetting the headset is attached and as soon as I get far enought away my computer starts making noise....

20

Unplug/disconnect your headphones, and mute the system volume. For added security, turn the volume all the way down. Plug in your headphones, and your volume should remain the same. The system will automatically switch between mute/no volume and the volume you have set for your headphones.

This is something that works on at least OSX 10.8 (I can't speak for sure on older versions of OSX), and a late 2008 or later Macbook. I tested it on both bluetooth and corded headphones.

  • No idea why I hadn't accepted this orginally, thank you for waiting... :) – Joe Sep 11 '18 at 8:14
  • 1
    This operation has to be performed each time when you listen to the speakers. Personally, I always forget to do it. Still looking for an automated solution. – Dmitriy Startsev Dec 24 '18 at 13:06
10

So I wrote a Mac app to do just that - automatically mute the volume when headphones get disconnected. It's called AutoMute and is available for $2.99 on the App Store, or you could just build from the source available on github for free.

  • doesn't work for me when I remove my airpods off the ears. macOS Mojave 10.14 – Dmitriy Startsev Dec 24 '18 at 13:03
  • Sorry to hear that, I'm afraid I don't have AirPods to test with, but this project is now open source, so anyone with AirPods- feel free to contribute: github.com/yonilevy/automute – yonilevy Dec 30 '18 at 19:37
  • it is not for free but for $2.99 :D – Lukáš Šálek May 2 at 10:26
  • @Lukᚊálek thanks for pointing it out, I made that change a week ago :) It's still open source and easy to build with XCode, I'll update the answer. – yonilevy May 4 at 15:24
2

I like to use the ControlPlane app for this. An added bonus is you can do more than just mute/unmute, such as turning dock auto-hiding off or on depending on whether you have external monitors attached or not.

Here is the setup I use:

  1. On the Contexts tab of ControlPlane's preferences, add a context named Headphones and another named Speakers.

  2. On the Evidence Sources tab, ensure that the Audio Output evidence source is enabled

  3. On the Rules tab, click the Add (+) button, select Add Audio Output Rule..., and set the following options:

    a. Audio output going to: Internal speakers

    b. Context: Speakers

    c. Confidence: 100% (Drag slider all the way to the right)

  4. Repeat step (3) with the following settings:

    a. Audio output going to: Headphones

    b. Context: Headphones

    c. Confidence: 100%

  5. On the Actions tab, click the Add (+) button, select Sound and Music Actions > Mute and set the following options:

    a. Toggle muting of system audio: Mute system audio

    b. at context: Speakers

    c. On arrival

  6. Repeat step (5) with the following settings:

    a. Toggle muting of system audio: Unmute system audio

    b. at context: Headphones

    c. On arrival

If you would prefer to have a single context, you can get by with that as well by (for example) having a Headphones context with mute on departure from the context.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .