title: How to programmatically list processes currently using the default sound output on Mac OS 10.6
body: <p>I would like to know if there is a programmatic way (public API, terminal command, AppleScript, etc.) to list all processes currently playing sound through the default sound output in Mac OS 10.6 ?</p>
  
  <p>I already tried using the "lsof | grep -i coreaudio" terminal command to list processes having a handle on Core Audio, but this does not tell me if those processes are outputting sound currently; they might have outputted sound before or they intend to do it in the future.</p>
  
  <p>For instance, if I open Google Chrome, at first it is not listed when I use the lsof command. Then, if I load a video on Youtube, it connects to Core Audio, so it gets listed. But, when I'm done with the video, even if I close the browser window completely, it still is listed as being connected to the driver even though it is obviously not playing sound anymore. It only stops being listed when I quit the process.</p>
  
  <p>Note that while having a lengthy programming experience in C++ on Windows platforms and knowing the Windows API pretty well, I'm rather new to Mac OS programming, so please be understanding if I miss something obvious.</p>
  
  <p>Thanks,
  François Charron</p>