title: AudioQueue read input volume
body: <p>I'm on OS X, and i've to read continuously input volume while i speak (like Siri that shows purple bar high or low for powerful voice or weak voice).
  I've tried this code but it returns me "parameter ID invalid":</p>
  
  <pre><code>    UInt32 size = sizeof(AudioQueueLevelMeterState) * record_state.data_format.mChannelsPerFrame;
      AudioQueueLevelMeterState *outValue = malloc(size);
  OSStatus errorMsg = AudioQueueGetProperty (record_state.queue, kAudioQueueProperty_CurrentLevelMeter,  &amp;outValue, &amp;size     );
  
      if (!errorMsg) {
          printf("Volume: %f", outValue[0].mPeakPower);
      }
      else
      {
          printf("Er: %i", errorMsg);
      }
  </code></pre>
  
  <p>How can i do?
  Thanks.</p>