What's the difference among AVAudioSessionPortBluetoothHFP, A2DP and LE?

老子叫甜甜 提交于 2019-12-21 02:03:30

问题


There are three different Bluetooth related audio port types documented in Apple's AVAudioSessionPortDescription reference. But Apple doesn't explain much about these three types. Can somebody help explain more?


回答1:


AVAudioSessionPortBluetoothHFP | Input and Output

This is used when connected to a bluetooth devices through Hands-Free profile, like cars or earpieces. It can be accessed by setting your audio session category to AVAudioSessionCategoryPlayAndRecord and category option AVAudioSessionCategoryOptionAllowbluetooth.

AVAudioSessionPortBluetoothA2DP | Output only

This is mainly used for streaming audio using A2DP (advanced audio distribution profile). The small portable bluetooth speakers (like the Jambox) use this profile for streaming audio. It can be accessed by setting your audio session category to AVAudioSessionCategoryPlayback.

AVAudioSessionPortBluetoothLE | Output only

New as of iOS 7 however I am not aware of any devices that you can stream audio to that implement the Bluetooth Low Energy protocol.



来源:https://stackoverflow.com/questions/23052869/whats-the-difference-among-avaudiosessionportbluetoothhfp-a2dp-and-le

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!