Our app invoke the method AudioOutputUnitStart in the foreground, and frequently return the error AVAudioSessionErrorCodeCannotStartRecording, also when appear the problem, the background no app running, the problem more often occured on the device iPad 8 wifi + iOS 14.6, what is the reason and how to debug it. Thanks!
OSStatus status = AudioOutputUnitStart(recordUnit);
if (status!=noErr) {
status = 561145187
}