Friday, April 30, 2010

Broken Sound in OS X

I use a MacBook with OS X 10.5.8 at work. Every now and then, at work, while streaming radio off the internet through iTunes, running Parallels, an IRC client, a Twitter client, an MSN client, a dozen terminal windows/tabs, Chrome with a dozen tabs, Firefox with a handful of tabs open, 30+ Stickies floating around and having not restarted my laptop for 2 weeks, my sound, all of a sudden, goes distorted and choppy (technical term!), which is very annoying when you are streaming radio to four other developers through a surround sound system.

At first I was just restarting my laptop. But that is a little annoying when you have that many programs, websites/tabs open and have to spend 15 minutes remembering what exactly it was you were doing when the sound decided to go rogue.

I noticed that when this occurs, the coreaudiod process starts to use a lot more CPU than usual, i.e. it becomes one of the top 4 CPU-hungry applications according to top. After killing the coreaudiod process, a new coreaudiod process was spawned and my sound returned to normal. Success!