Swift中播放短音频

前端之家收集整理的这篇文章主要介绍了Swift中播放短音频前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
var systemSoundID:SystemSoundID = 0; let path = Bundle.main.path(forResource: "composer_close",ofType: "wav") AudioServicesCreateSystemSoundID(NSURL.fileURL(withPath: path!) as CFURL,&systemSoundID) AudioServicesPlayAlertSound(SystemSoundID(systemSoundID))

猜你在找的Swift相关文章