title: iOS AVAudioSession, how to access AVAudioRecorder audio-level meter
body: <p>I am using a framework from a vendor, where the audio recording in the mobile app is initiated from <code>AVAudioSession</code> and can not find anywhere <code>AVAudioRecorder</code> in order to initiate the audio-level meter, to be displayed on the main screen.</p>
  
  <p>Any hints or suggestions how to achieve this? How to get the current microphone level from <code>AVAudioSession</code></p>
  
  <p>Here is the code being used:</p>
  
  <pre><code>[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) {
  
      if (granted) {
          dispatch_async(self.audioSessionQueue, ^{
              NSError *error;
              [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryRecord error:&amp;error];
              [[AVAudioSession sharedInstance] setActive:YES error:&amp;error];
  
              self.audioCaptureSession = [[AVCaptureSession alloc] init];
              [self.audioCaptureSession beginConfiguration];
  AVCaptureDevice *audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
              AVCaptureDeviceInput *audioCaptureDeviceInput = [AVCaptureDeviceInput deviceInputWithDevice:audioCaptureDevice error:&amp;error];
  
      if ([self.audioCaptureSession canAddInput:audioCaptureDeviceInput])
              {
                  [self.audioCaptureSession addInput:audioCaptureDeviceInput];
              }
      else
              {
                  NSLog(@"Couldn't add audio capture device input.");
  
                  [self.audioCaptureSession commitConfiguration];
                  return;
              }
  
              [self.audioCaptureReader setResultsDelegate:self queue:dispatch_get_main_queue()];
              [self.audioCaptureSession addOutput:self.audioCaptureReader.captureOutput];
  
  [self.audioCaptureSession commitConfiguration];
  [self.audioCaptureSession startRunning];
  }
  </code></pre>