AVAudioEngine crashes when I unplug headphones during a call

后端 未结 1 1288
遥遥无期
遥遥无期 2021-02-19 11:28

Here is what I see in the log:

16:33:20.236: Call is Dialing
16:33:21.088: AVAudioSessionInterruptionNotification
16:33:21.450: AVAudioSessionRouteChangeNotifica         


        
相关标签:
1条回答
  • 2021-02-19 12:06

    I suspect the problem is here:
    audioEngine.connect(audioTimePitch, to: mainMixer, format: mainMixer.outputFormatForBus(0))

    The documentation says:

    This method calls connect:to:fromBus:toBus:format: using bus 0 for the source audio node, and bus 0 for the destination audio node, except in the case of a destination which is a mixer, in which case the destination is the mixer’s nextAvailableInputBus.

    0 讨论(0)
提交回复
热议问题