1

I’m developing a voice communication app for the iPad with both playback and record and using AudioUnit of type kAudioUnitSubType_VoiceProcessingIO to have echo cancellation.

When playing the audio before initializing the recording audio unit, volume is high. But if I'm playing the audio after initializing the audio unit or when switching to remoteio and then back to vpio the playback volume is low.

It seems like a bug in iOS, any solution or workaround for this? Searching the net I only found this post without any solution: https://developer.apple.com/forums/thread/671836

Oren Bengigi
  • 994
  • 9
  • 17
  • If you use `AVAudioEngine`'s implementation of this and do all your audio IO using the engine, you get full volume! It could be a regression, however. The quietness may actually be the algorithm "working as intended". – Rhythmic Fistman Feb 15 '22 at 08:51
  • Isn't AvAudioEngine use audio units it internaly? – Oren Bengigi Feb 17 '22 at 09:30

1 Answers1

0

No software workaround. The echo cancelling algorithm requires some headroom in order never to clip (or produce audio sample values that are out-of-range) when filtering out echos, so must lower the volume in order to allow headroom for that increase.

The hardware workaround is to use an external amplified speaker.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153