当默认模式兼容所有类别时,AVAudioSession中的其他模式有什么用途


// Access the shared, singleton audio session instance
let session = AVAudioSession.sharedInstance()
do {
// Configure the audio session for movie playback
try session.setCategory(AVAudioSessionCategoryPlayback,
mode: AVAudioSessionModeMoviePlayback,
options: [])
} catch let error as NSError {
print("Failed to set the audio session category and mode: (error.localizedDescription)")
}

无法理解音频会话中模式的使用。

此处的模式

其他模式针对特定用途进行了优化。"兼容"与"最佳"不同。例如,当使用视频聊天模式时:

设备的音调均衡针对语音进行了优化,允许的音频路由集减少到仅适用于视频聊天的路由。

相关内容

最新更新