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] 
相關問題