title: Code sample for capturing audio from a Mac in Cocoa and saving to file?
body: <p>I'm due to work on a small application that captures audio from the Mac's Audio Queue and needs to save it to disk in some reasonable audio format.</p>
  
  <p>Does anyone have a some decent sample code (Cocoa / Objective-C) that they can share?  </p>
  
  <p>I specifically need to capture the audio that is being passed to the Built-in Output device in order to record it.  Any insights? The answers so far have been helpful, but have not helped me understand how the data going to the output can be captured, agnostic of the input source.</p>