AudioOutputUnitStop((AudioKitSingleton.sharedInstance?.AudioKitvar.engine.inputNode?.audioUnit)!)
AudioUnitUninitialize((AudioKitSingleton.sharedInstance?.AudioKitvar.engine.inputNode?.audioUnit)!)
In my project, am also checking for .isrunning, and if .isrunning goes false, the recording takes more time with resetting up audiokit and plays the audio again. But that only happens like very rarely. 1 in 50. And not like before wherein it went true and still did not play sound.
Dont know if that will work with ipad pro as they also got stereo speakers. With this it works on my iphone 5s and ipad air 2.