title: iOS6 very low volume when using PlayAndRecord audio session category
body: <p>I have an application that plays audio via AVAudioPlayer as well as an AudioUnit player implementation. As of iOS6, the playback volume (regardless of the playback mechanism) through the speaker has been reduced dramatically -- to a point where the volume is barely audible even at maximum volume. If I simply change the audio session to one of the others like kAudioSessionCategory_SoloAmbientSound or kAudioSessionCategory_MediaPlayback the volume levels return to what they were previous to iOS6 but of course I am not able to record audio. On the same device running iOS5 (or iOS4), there's no difference in volume levels with the different audio session categories.</p>
  
  <p>Has anybody else encountered this problem? I'm stuck trying to figure out how to return the volume levels to normal in my application. I've filed a bug with Apple because it seems like this is a bug since the volume levels are so dramatically different between the different categories but I don't expect to get an answer (or solution) quickly from them.</p>
  
  <p>Configuring the Audio Session:</p>
  
  <pre><code>UInt32 category = kAudioSessionCategory_PlayAndRecord;
  error = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category),  &amp;category);
  if (error) {
      // handle error
  }
  
  UInt32 speakerOverride = 1;
  error = AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, sizeof(speakerOverride), &amp;speakerOverride);
  if (error) {
      // handle error
  }
  </code></pre>