AVAudiounitTimepitch issue iOS 16

Hi After IOS 16 update users are experiencing audio distortion when attempting to change Pitch and/or Tempo in the app which uses AVAudiounitTimepitch to achieve this. Prior to IOS 16 it has worked quite admirably. I see suggestions to change the algorithm used but am able to achieve this. Any pointers are appreciated

Answered by nanduvad in 744503022

This was solved with the following code:

  var componentDescription = AudioComponentDescription()

        componentDescription.componentType = kAudioUnitType_FormatConverter

        componentDescription.componentSubType = kAudioUnitSubType_TimePitch

        let rf = AVAudioUnitTimePitch(audioComponentDescription:componentDescription)

Accepted Answer

This was solved with the following code:

  var componentDescription = AudioComponentDescription()

        componentDescription.componentType = kAudioUnitType_FormatConverter

        componentDescription.componentSubType = kAudioUnitSubType_TimePitch

        let rf = AVAudioUnitTimePitch(audioComponentDescription:componentDescription)

Thanks for asking/answering this question. I had a similar issue with code that has been in use since at least iOS 8.

Do you have further insight into what changes occurred in iOS16 that precipitated this change being necessary?

AVAudiounitTimepitch issue iOS 16
 
 
Q