这是我的代码示例...对于少数音频文件(mp4扩展名)它失败并出现异常“操作无法完成。(OSStatus错误2003334207。)”我从iPhone下载容器并确认文件存在于路径上do{audioPlayer=tryAVAudioPlayer(contentsOf:url)//guardletplayer=playerelse{return}audioPlayer.delegate=selfaudioPlayer.prepareToPlay()audioPlayer.play()audioPlayer.volume=1.0iftimer!=nil&&timer.isValid{time
我正在使用AVAudioPlayer播放保存在Iphone的文档目录中的录制音频。当我第一次录制音频然后播放时,它工作正常(设备连接到系统并且应用程序通过Xcode运行)。但是当我通过Xcode停止正在运行的应用程序并再次通过Xcode运行该应用程序时,我收到错误ErrorDomain=NSOSStatusErrorDomainCode=2003334207"Theoperationcouldn'tbecompleted.(OSStatuserror2003334207.)"文件位置:file:///var/mobile/Containers/Data/Application/410A
我正在尝试在按下按钮时播放MP3文件(通过VLC/iTunes播放时有效)。这是我的代码:varaudioPlayer:AVAudioPlayer!@IBActionfuncplayEpisode(sender:AnyObject){println("nowplaying")letindexPath=NSIndexPath(forRow:sender.tag,inSection:0)letdata:CDEpisode=fetchedResultsController.objectAtIndexPath(indexPath!)as!CDEpisodevarerr:NSError?letu