Tuesday, 8 October 2019

AVAudioPlayer volume low with VoiceProcessingIO

When using kAudioUnitSubType_VoiceProcessingIO combined with AVAudioPlayer this leads to the audio playback volume being pretty low. When switching to kAudioUnitSubType_RemoteIO the playback volume is again on a proper high level.

It is depending on the order 3 steps

  • A. Configuring the VoiceProcessingIO Audio Unit
  • B. Creating an audio player
  • C. Playing the audio player

The volume differs heavily on the order of these 3 steps.

Here is an example repository (don't wonder why its called audiokit, its a collection of issues I am having with different audio sdks, all started with audiokit)

https://github.com/mlostekk/AudioKitSampleRate/tree/issue/outputVolumeNoAudiokit (branch outputVolumeNoAudiokit)

In our app the regular case is represented by the button VP3. First setting up our voice processing input callback, then at a later time we create audio players and play them back. But this scenario leads to very low output volume

The order is A -> B -> C

Sidenote

The button VP1 (B -> C -> A) leads to extremely loud volume.

The button VP2 (B -> A -> C) leads also to extremely loud volume

The button NoVP1 uses also A -> B -> C, which is the normal case, but in fact here voice processing is disabled, but we need it.

Does anybody have an explanation why this is behaving like it is. And how to solve the VP3 scenario to have normal / not so low output volume



from AVAudioPlayer volume low with VoiceProcessingIO

No comments:

Post a Comment