質問

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 | 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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top