Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

advert2020

macrumors newbie
Original poster
May 22, 2020
4
0
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? Do you have any advice for where to start on this? I can write basic UNIX scripts and know enough Objective-C to make a simple app (though that was a few years ago now).

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.