jjzjj

swift - 端口扬声器的未知选定数据源(类型 : Speaker)?

我多次在cat日志中收到此消息:[avas]AVAudioSessionPortImpl.mm:56:ValidateRequiredFields:UnknownselecteddatasourceforPortSpeaker(type:Speaker)我正在使用这段代码来播放背景音乐:letpath=Bundle.main.path(forResource:fileName,ofType:"mp3")!leturl=URL(fileURLWithPath:path)do{letsound=tryAVAudioPlayer(contentsOf:url)self.player=soun