AVAudioSessionCategoryPlayAndRecord with Airplay [英] AVAudioSessionCategoryPlayAndRecord with Airplay

查看:99
本文介绍了AVAudioSessionCategoryPlayAndRecord with Airplay的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用麦克风并输出音频,因此我将音频会话设置为播放和录制类别,但这似乎禁用了Airplay。如果我将类别设置为Play,Airplay可以正常输出(但显然输入不起作用)。

My app uses the microphone and outputs audio, so I am setting my Audio Session to the Play and Record Category, but this seems to disable Airplay. If I set the category to Play, Airplay works fine with my output (but obviously the input doesn't work).

我已经尝试将输出路径覆盖到扬声器,如果它需要通过Airplay输出,但没有快乐。

I've tried overriding the output route to speaker, in case it needed that to output over Airplay, but no joy.

任何想法?

推荐答案

您尝试使用哪种AirPlay设备?它是否有麦克风?

What AirPlay device are you trying to use? Does it have a microphone?

如果没有,iOS在使用PlayAndRecord类别时不会将其作为选项显示,因为该设备无法播放记录。它会在使用Play类别时显示。

If not, iOS won't present it as an option when using the PlayAndRecord category, because that device can't play and record. It would show up when using the Play category though.

此外,如果您使用的设备是蓝牙设备,您是否将AVAudioSessionCategoryOptionAllowBluetooth设置为YES?

Also, if the device you are using is a Bluetooth device, have you set AVAudioSessionCategoryOptionAllowBluetooth to YES?

这篇关于AVAudioSessionCategoryPlayAndRecord with Airplay的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆