You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letoptions:AVAudioSession.CategoryOptions=[.mixWithOthers,.allowBluetoothA2DP,.allowBluetooth]try session.setCategory(.playAndRecord, mode:.default, options: options)try session.setActive(true)
if let inputs = session.availableInputs {
for input in inputs {
if input.portType ==.bluetoothHFP {do{try session.setPreferredInput(input)}catch{print(error)}}}}
I set audio session's input to BluetoothHFP for playing and recording music with Bluetooth mic.
After changing the input, there is no sound even after restarting the player.
The text was updated successfully, but these errors were encountered:
I set audio session's input to BluetoothHFP for playing and recording music with Bluetooth mic.
After changing the input, there is no sound even after restarting the player.
The text was updated successfully, but these errors were encountered: