I want to create a launch daemon in Mac OS to monitor the headphone jack for a connection and then force the module to stay on if a connection is detected (as it would if audio were playing, but I want the module to remain on whether or not it is being given any audio). Is this something that is going to be possible with launchd?

Background: The new MacBook Pro 13" has an issue where it creates a popping sound every time audio stops and starts on headphones. This is caused by Core Audio shutting the headphone module on and off as soon as it stops detecting output. Overriding this behaviour by having a muted audio source playing in the background solves the problem, but at the cost of CPU usage (and inconvenience). I want to create a daemon that has the same effect, but with lower/negligible cpu usage that is able to detect when headphones are connected.

  • see Where to start? – gnat May 22 at 6:34
  • A small popping sound is somewhat normal, otherwise this sounds more like a problem with your headphones. Do they use active noise cancelling? Have you verified with different headphones, or by measuring the voltage? – amon May 22 at 7:52
  • It’s not normal, I’ve verified with other headphones, and no they are not noise cancelling. Thanks anyway. – advert2013 May 22 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.