Documentation

Support

Vivox Core SDK

Vivox Core SDK

Volume shifts

Learn how to manage volume shifts on iOS.
Read time 1 minuteLast updated 20 hours ago

iOS increases the volume of ducked game audio unexpectedly and without notification when certain device events occur. An example of this scenario is when you dismiss the AirPods battery dialog. The following steps detail how to reproduce this behavior:
  1. Connect the AirPods.
  2. Configure the AVAudioSession with:
    • AVAudioSessionCategoryPlayAndRecord
    • AVAudioSessionModeVoiceChat
  3. Open the capture device with VoiceProcessingIO enabled. To do this, use either:
    • A CoreAudio Audio Unit with the
      kAudioUnitSubType_VoiceProcessingIO
      subtype
    • An AVAudioEngine input node and call
      setVoiceProcessingEnabled(true)
  4. Play audio from an AVAudioPlayer.
  5. Open the AirPods case.
  6. Dismiss the AirPods battery dialog. Note that the audio player volume increases significantly.