在iOS 10或更低版本中,当我们将AVAudioSession设置为playAndRecord类别时,在配置RemoteIO时,AirPods通常被选为默认输入和输出。我可以通过使回调中的样本静默来抑制输出,但从iOS11开始,似乎AirPods没有被作为输入拾取,只有输出被拾取。RIO使用内置麦克风,并且在AirPods上可以听到输出,这是iOS11上的新行为吗?如果是,我们如何接收蓝牙输入,如AirPods?如果有什么不同的话,我也会让AVCaptureSession运行。
发布于 2017-11-26 20:42:50
默认情况下,可以将AVAudioSessionCategoryOptionAllowBluetoothA2DP和AVAudioSessionCategoryOptionAllowBluetooth传递给setCategory来选择AirPods麦克风:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionAllowBluetoothA2DP
error:&error]https://stackoverflow.com/questions/47363388
复制相似问题