gpt4 book ai didi

ios - 如何在 iOS 中强制将音频输出路由到蓝牙 A2DP?

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:20:57 25 4
gpt4 key购买 nike

应用程序需要通过 HFP 录制声音,但通过 A2DP 播放声音。

try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, with:[AVAudioSessionCategoryOptions.allowBluetooth, AVAudioSessionCategoryOptions.allowBluetoothA2DP,  AVAudioSessionCategoryOptions.mixWithOthers])

据我所知,这将允许我使用同时支持 HFP 和 A2DP 的蓝牙设备录制和播放声音。但是,当我查看文档时,它说

when a single device supports both the Hands-Free Profile (HFP) and the Advanced Audio Distribution Profile (A2DP), the Hands-Free ports will be given a higher priority for routing

所以,录制和播放都是 HFP,我找不到强制通过 A2DP 播放的方法。

最佳答案

好的,目前没有办法做到这一点。我已经与Apple验证了这一点。

关于ios - 如何在 iOS 中强制将音频输出路由到蓝牙 A2DP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51170128/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com