I am trying to transmit audio when app is in background and AVAudioSession changed to Headset from speaker or vice versa
Changed output AVAudioSession Port: Speaker/BluetoothHFP
I have tried restarting audioEngine but getting following errors:
[aurioc] AURemoteIO.cpp:1663 AUIOClient_StartIO failed (561145187)
[avae] AVAEInternal.h:109 [AVAudioEngineGraph.mm:1545:Start: (err = PerformCommand(*ioNode, kAUStartIO, NULL, 0)): error 561145187 Engine Check: Restarted AVAE
Error starting engine: The operation couldn’t be completed. (com.apple.coreaudio.avfaudio error 561145187.)