问题描述
根据文档,Ther并不是关于路由或获取"AVAudioSessionPortBuiltInReceiver"的端口详细信息的文档. (注意:请再次阅读,与该端口AVAudioSessionPortBuiltInSpeaker
无关).
As per the docs, Ther is no documentation about routing or even getting of the Port details for the "AVAudioSessionPortBuiltInReceiver". (Note: Please read again, its not about this port AVAudioSessionPortBuiltInSpeaker
) .
正如我发现的,只有overrideOutputAudioPort
只能用于
As I found that and only possible overrideOutputAudioPort
can be done only for
public enum AVAudioSessionPortOverride : UInt {
case None
case Speaker
}
问题是,还有没有可能通过:
public let AVAudioSessionPortBuiltInReceiver: String /* The speaker you hold to your ear when on a phone call */
使用MPVolumeView
类(RouteButton)可以列出(路由到)AVAudioSessionPortBuiltInReceiver,是否可以实现?
Using MPVolumeView
class(RouteButton) is listing out(routing to) of the AVAudioSessionPortBuiltInReceiver possible, Is it possible to achieve the same?.
推荐答案
如果配置音频会话以进行播放和录制(并关闭与其他人的混音),iPhone上的默认路由将变为播放音频如果用户插入耳机,则从较小的耳机(而不是底部的扬声器)中拔出,或者从插入的耳机中拔出.
If you configure the audio session for play-and-record (and leave mix-with-others off), the default route on an iPhone becomes to play audio out the smaller ear speaker (not the louder speaker on the bottom), or out the plugged-in headset, if the user plugs a headset in.
这篇关于核心音频:使用扬声器,是否可以路由到内部扬声器-AVAudioSessionPortBuiltInReceiver(不连接扬声器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!