0

在iOS系统10或以下,当我们有一个与AVAudioSession类别playAndRecord设置,用于AirPods被配置RemoteIO拾取后作为默认的输入输出&。我可以沉默样品中的回调,但与iOS11开始剿输出,似乎AirPods没有得到拿起作为输入,只能输出。 RIO使用内置麦克风,并在AirPods上听到输出这是iOS11上的新行为吗?如果是的话,我们如何拿起蓝牙输入,如AirPods?如果这有所作为,我也会运行AVCaptureSession。RemoteIO与AirPods

+0

什么AVAudioSession选择您使用的?仅蓝牙还是A2DP? – hotpaw2

回答

0

你可以通过AVAudioSessionCategoryOptionAllowBluetoothA2DPAVAudioSessionCategoryOptionAllowBluetoothsetCategory默认挑AirPods话筒:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord 
           withOptions:AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionAllowBluetoothA2DP 
             error:&error] 
相关问题