antipop
Current version: 1.0.2
Description
antipop is a LaunchAgent designed to prevent Mac OS X from turning off the sound system. On many laptops (particularly on MacBooks and MacBook Pros), the sound system emits an audible pop or click when it goes to sleep. This is particularly noticeable when a low-impedence or externally-amplified device is plugged in to the laptop's line-out jack -- users with sensitive headphones or amplified speakers often hear this pop when Mac OS X puts the laptop's sound hardware to sleep after 15-30 seconds of inactivity. This software stops this pop from occuring.
Tested under Mac OS X 10.5 "Leopard", but should work on Mac OS X 10.4 "Tiger" as well. (If it doesn't please let me know.)
Notes
antipop uses Mac OS X's 'say' binary to speak a single space every 10 seconds. While this will not produce any audible output, it will prevent Mac OS X from putting the sound system to sleep. By default, antipop will only do this when the laptop is plugged-in -- when on battery, the sound system will sleep normally. If you wish to change this behavior, simply execute the following command:
echo -n "0" > /usr/local/share/antipop/ac_only
Changes take effect upon reboot.
I haven't noticed any decreased battery life when running with antipop enabled, but I left it off by default just to be safe.
The performance impact is pretty minimal. Unless you're benchmarking you won't notice it -- and even then, you'd be hard pressed to notice an effect.
Changelog
- 1.0.2 - antipop is now a LaunchAgent. I found that it wouldn't work reliably as a LaunchDaemon. Shouldn't be a big deal, and it's not a bad idea to have the sound system power off if the machine is idling at the login window anyways.
- 1.0.1 - Installs to /usr/local/bin and /usr/local/share instead of /usr/bin and /usr/share. /usr/local/ doesn't exist on most default Leopard installs, but it's technically the right place for this sort of thing on a *nix box... so there you go.
- 1.0 - Initial release
License
This is pretty trivial code. It's what, like ten lines of bash? Anyway, since I don't want anyone selling this and ripping off some new Mac user, let's just say its licensed under the Creative Commons Attribution Noncommercial Share Alike License 3.0.
Download
Version 1.0.2 (current)
Download 'antipop 1.0.2' from this server.
Version 1.0.1
Download 'antipop 1.0.1' from this server.