AVAudioSession的PlayAndRecord类别和AVAudioSessionModeMeasurement与defaultToSpeaker选项不兼容吗? [英] AVAudioSession's PlayAndRecord category and AVAudioSessionModeMeasurement are incompatible with defaultToSpeaker option?

查看:98
本文介绍了AVAudioSession的PlayAndRecord类别和AVAudioSessionModeMeasurement与defaultToSpeaker选项不兼容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用AVAudioSessionModeMeasurement模式将AVAudioSession放入.playAndRecord类别会导致.defaultToSpeaker选项被忽略,导致输出在听筒(也称为接收器)中安静地播放.

Attempting to put AVAudioSession into the .playAndRecord category with the AVAudioSessionModeMeasurement mode causes the .defaultToSpeaker option to be ignored, resulting in output being played quietly out the earpiece (also known as the receiver).

推荐答案

虽然关于这方面的文字似乎不多,但文档使这种将音频输出发送到接收器而不是扬声器的最终结果"看起来像可能的预期行为,而不是错误.

While there doesn't seem to be much written about this the documentation makes this "end result of audio output being sent to the receiver rather than speaker" seem like possible intended behavior and not a bug.

让AVAudioSessionModeMeasurement:字符串

此模式适用于需要最小化 系统提供的信号处理功能,用于输入和输出信号.如果 在具有多个内置麦克风的设备上录音, 使用主麦克风.

This mode is intended for apps that need to minimize the amount of system-supplied signal processing to input and output signals. If recording on devices with more than one built-in microphone, the primary microphone is used.

这篇关于AVAudioSession的PlayAndRecord类别和AVAudioSessionModeMeasurement与defaultToSpeaker选项不兼容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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