Using VoiceProcessingIO audio unit subtype instead of RemoteIO causes unwanted drop in output volume Using VoiceProcessingIO audio unit subtype instead of RemoteIO causes unwanted drop in output volume ios ios

Using VoiceProcessingIO audio unit subtype instead of RemoteIO causes unwanted drop in output volume


I realize that this hasn't been answered in a long time, but I found that if you do the following between changing audio units:

AudioComponentInstanceDispose(_ioUnit);[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient  error:&nsError];[[AVAudioSession sharedInstance] setActive:NO error:&nsError];

Then it seems to not create such a huge loudness problem between each unit. At this point, just reinitialize your audio unit and set the session type to what you need.


I do not think it is possible to account for the loss of output in volume. According to Recording volume drop switching between RemoteIO and VPIO

"There is no API that controls this gain (or in your case drop) level, everything is internally setup by the OS depending on Audio Session Category (for example VPIO is expected to be used with PlayAndRecord always) and which IO unit has been setup."

It would also help if you said what iOS you were testing on because they have different drops in output volume.