问题描述
有三种不同的蓝牙音频相关的端口类型记录在苹果的 AVAudioSessionPortDescription 参考。但是,苹果没有解释太多关于这三种类型。有人可以帮助解释吗?
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?
推荐答案
AVAudioSessionPortBluetoothHFP |输入和输出
当通过免提模式连接到蓝牙设备,如汽车或耳罩时使用。它可以通过音频会话类别设置为 AVAudioSessionCategoryPlayAndRecord
和类别选项 AVAudioSessionCategoryOptionAllowbluetooth
进行访问。
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 |只输出
这是主要用于使用A2DP(高级音频分配模式)音频流。该小型便携式蓝牙音箱(如JAMBOX)使用此配置文件用于音频流。它可以通过音频会话类别设置为 AVAudioSessionCategoryPlayback
进行访问。
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 |只输出
作为新的iOS 7的但是我不知道任何设备,你可以传输音频到实现低功耗蓝牙协议。
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.
这篇关于什么是中AVAudioSessionPortBluetoothHFP,A2DP和LE的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!