4 Replies
      Latest reply on May 10, 2020 9:03 PM by appleaudioFUN
      Jacik Level 1 Level 1 (0 points)

        Hi,

         

        All of you propably already know that new iPad Pro has four speakers. When you listen to stereo audio and rotation the device, audio channels are automatically switched to correct speakers so that the user can hear it from correct eft and right side.

        You may not know that when you use e.g. Skype, it also automatically does not play audio from the speaker which is located next to the microphone.

        This is to reduce echo, becuase microphone and one of the speaker is located very close together.

        It actually plays audio only on two speakers which are located on the opposite side of the device.

         

        You can enable this "feature" when you configure Audio Unit as kAudioUnitSubType_VoiceProcessingIO subtype.

        This works perfectly with this configuration but all audio processing features like "echo canceler" or "automatic gain control" are also enabled.

         

        Do you know if there is a API which I can use to enable this particular behaviour for kAudioUnitSubType_RemoteIO subtype audio unit?

         

        BTW: I know that there are properties to disable voice processing for kAudioUnitSubType_VoiceProcessingIO subtype, but I am looking posibility to enable this particular feature.

         

        Thanks in advance.

         

        Rafal

        • Re: iPad Pro dynamic speaker configuration
          Jacik Level 1 Level 1 (0 points)

          Hi,

           

          I want to post what I was able to figure out. Maybe it will be helpfull for someone.

          To enable the feature which avoid playing on the speaker located right next to the microphone you have to do two things.

          Set Audio Unit Subtype to kAudioUnitSubType_VoiceProcessingIO.

          Set AVAudioSession mode to AVAudioSessionModeVoiceChat - this is default value when you use VPIO Audio Unit, but when you switch between different Audio Unit subtypes It should be set explicitly.

           

          One disadvantage of using VOIP is that it only supports mono, so if you want to switch to Headphones and have stereo,  you must use RemoteIO Audio Unit.

          Remember that you should set explicitly AVAudioSession category and mode every time when switching Audio Unit. I've notice some audio problems (low input level, audio on headphones was heard like mono but it was configured as stereo).

           

           

          BTW: VPIO Audio Unit can also be used on OS X but only for Built-in Speaker and Microphone. Thanks to that you will take advantage from system echo canceler which cut off very nicely voice which comes from the speaker and was capture by the micophone (microphone is located right next to the speaker so it is important for those who don't have their own echo canceler alghorimt implemented).

            • Re: iPad Pro dynamic speaker configuration
              timna Level 1 Level 1 (0 points)

              I am having difficult time with new 2017 iPad Pro.  Our customer purchased new 2017 ones and it's causing echo.  I carefully looked again to make sure that both kAudioUnitSubType_VoiceProcessingIO and AVAudioSessionModeVoiceChat are being used yet still there is clearly echo produced.  I even made very simple test app that has nothing but to record and play back with some delay and it still produces echo.  Same code is working fine with iPhone 6S using loudspeaker mode.  Not sure what kind of mode Facetime is using to avoid this issue..

              • Re: iPad Pro dynamic speaker configuration
                arshiacont Level 1 Level 1 (0 points)

                Hi Rafal,

                 

                We were experiencing the same difficulty (willing to choose Speaker channels on iPadPro) and I saw your post!

                 

                I just switched to kAudioUnitSubType_VoiceProcessingIO and AVAudioSessionModeVoiceChat but they do not seem to "turn off" the top or bottom speakers on any configuration at all but just activate the Echo Suppression algorithm.

                 

                Did you ever manage to see/hear the speaker routing using this setup?

                 

                Thanks in advance for sharing your experience,

                 

                Arshia

              • Re: iPad Pro dynamic speaker configuration
                appleaudioFUN Level 1 Level 1 (0 points)

                hi

                do you find it ,if you use the ipad pro which have four speaker,use voiceprosessingIO , the voice will smaller than iphone?and smaller than remoteIO?

                but i use mini 5 (vpio) is bigger than this ipad ,when i play sound (vpio)

                do yuo have some method?