
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"beep" ofType:@"mp3"]];self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];self.player.volume = 1;[self.player preparetoPlay];
我的异常断点将在preparetoPlay和console log写入时停止:
ERROR: AVAudioSessionUtilitIEs.h:111: GetProperty:
AudioSessionGetProperty (‘prp?’) Failed with error: ‘pty?
经过2次点击以通过此断点后,应用程序不会崩溃.这只发生在模拟器中.
有什么建议?
NSURL *url;url = [NSURL fileURLWithPath:[Nsstring stringWithFormat:@"%@/beep.mp3",[[NSBundle mainBundle] resourcePath]]];self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];self.audioPlayer .delegate = self;[self.audioPlayer preparetoPlay];[self.audioPlayer play];总结
以上是内存溢出为你收集整理的模拟器中的AVAusioSession pty错误全部内容,希望文章能够帮你解决模拟器中的AVAusioSession pty错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)