Change AudioUnit from VPIO to RemoteIO occurs the volume was reduced (iOS 14 only)

When I change audio unit from VPIO(VoiceProcessingIO) to remoteIO, the volume was reduced and can not restore to normal level.

There's a workaround by this post:

h ttps://trac.pjsip.org/repos/ticket/1697

I use the workaround in my code and according flowing steps:
  1. stop and destory all the running IO AudioUnit (remoteIO and VPIO)

  2. run workaround code

Code Block
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryRecord error:nil];
[[AVAudioSession sharedInstance] setActive:NO error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];

3. setup remoteIO and run.

and it work perfectly! The volume of remoteIO was go to normally.

But sadness happens on iOS 14, the workaround is not work at all.



Replies

Did you find a workaround for this? Also happens on 15.3 :(