title: IOS Audio Recording, How to Check if Mic / Playback is Busy Before Taking Mic
body: <p>If anything is playing, recording, how to we check to see if the MIC is available (idle) for recording?  Currently using </p>
  
  <pre><code>AVCaptureDevice *audioCaptureDevice      = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
  AVCaptureSession *captureSession         = [[AVCaptureSession alloc] init];
  VCaptureDeviceInput *audioInput          = [AVCaptureDeviceInput deviceInputWithDevice : audioCaptureDevice error:&amp;error];
  AVCaptureAudioDataOutput    *audioOutput = [[AVCaptureAudioDataOutput alloc] init];
  [captureSession addInput  : audioInput];
  [captureSession addOutput : audioOutput];
  [captureSession startRunning];
  </code></pre>
  
  <p>Need to check before grabbing the MIC / Playback from something that is already has it.</p>