title: AudioObjectGetPropertyData to get a list of input devices
body: <p>How do I utilize <code>AudioObjectGetPropertyData</code> in OS X to retrieve a list of the system's input devices?  I currently have the following dummy code for retrieving a global list of devices:</p>
  
  <pre class="lang-c prettyprint-override"><code>AudioDeviceID devices[12];
  UInt32 arraySize = sizeof(devices);
  
  AudioObjectPropertyAddress thePropertyAddress = { kAudioHardwarePropertyDevices, 
                                                    kAudioObjectPropertyScopeGlobal, 
                                                    kAudioObjectPropertyElementMaster };
  
  AudioObjectGetPropertyData(kAudioObjectSystemObject, 
                             &amp;thePropertyAddress, 
                             0, 
                             NULL, 
                             &amp;arraySize, 
                             &amp;devices);
  </code></pre>