title: Using Cocoa to detect when a running application plays audio
body: <p>I'm looking into writing an app that runs as a background process and detects when an app (say, Safari) is playing audio. I can use <code>NSWorkspace</code> to get the process ID's of the currently running applications but I'm at a loss when it comes to detecting what those processes are doing. I assume that there is a way to listen in on a process and detect what public messages the objects are sending. I apologize for my ignorance on the subject.</p>
  
  <p>Has anyone attempted anything like this or are aware of any resources that can help?</p>