本文介绍了Error Domain = NSOSStatusErrorDomain代码= 560030580“操作无法完成. (OSStatus错误560030580.)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AVPlayer播放在线mp3流!当我暂停播放器

I was using AVPlayer to play online mp3 stream ! When I pause the player

[AVPlayer pause];
AVAudioSession *session = [AVAudioSession sharedInstance];
session.delegate = nil;
NSError *error = nil;
[session setActive:NO error:&error];
NSLog([error description]);

我遇到了错误,错误域= NSOSStatusErrorDomain代码= 560030580操作无法完成.(OSStatus错误560030580.)"

I met the error , Error Domain=NSOSStatusErrorDomain Code=560030580 "The operation couldn’t be completed. (OSStatus error 560030580.)"

有人可以告诉我为什么以及如何解决吗?

Can anyone tell me why and how to resolve it?

非常感谢您!

推荐答案

我也遇到了这个问题.我在Google上搜索了一次以上的信息.有人说,在论坛中,AVAudioSession.h可以找出错误代码.

I encounter this problem too. I googled and see this post more than one time. From the forum, someone said, the error code can be figured out by AVAudioSession.h.

就我而言,问题似乎是race condition问题.它永远不会在我的iPhone 5s上发生,但是通常会在其他设备上发生,例如:iPhone6 Plus.

In my case, the problem seems to be race condition problem. It never happens on my iPhone 5s, but happens on other devices generally, ex: iPhone6 Plus.

据我所知,错误代码560030580表示AVAudioSessionErrorCodeIsBusy.

As far as I know, the error code 560030580 means AVAudioSessionErrorCodeIsBusy.

AVAudioSession.h中定义了以下内容.

typedef NS_ENUM(NSInteger, AVAudioSessionErrorCode)
{
    AVAudioSessionErrorCodeNone                         =  0,
    AVAudioSessionErrorCodeMediaServicesFailed          = 'msrv',           /* 0x6D737276, 1836282486   */
    AVAudioSessionErrorCodeIsBusy                       = '!act',           /* 0x21616374, 560030580    */
    AVAudioSessionErrorCodeIncompatibleCategory         = '!cat',           /* 0x21636174, 560161140    */
    AVAudioSessionErrorCodeCannotInterruptOthers        = '!int',           /* 0x21696E74, 560557684    */
    AVAudioSessionErrorCodeMissingEntitlement           = 'ent?',           /* 0x656E743F, 1701737535   */
    AVAudioSessionErrorCodeSiriIsRecording              = 'siri',           /* 0x73697269, 1936290409   */
    AVAudioSessionErrorCodeCannotStartPlaying           = '!pla',           /* 0x21706C61, 561015905    */
    AVAudioSessionErrorCodeCannotStartRecording         = '!rec',           /* 0x21726563, 561145187    */
    AVAudioSessionErrorCodeBadParam                     = -50,
    AVAudioSessionErrorInsufficientPriority             = '!pri',           /* 0x21707269, 561017449    */
    AVAudioSessionErrorCodeResourceNotAvailable         = '!res',           /* 0x21726573, 561145203    */
    AVAudioSessionErrorCodeUnspecified                  = 'what'            /* 0x77686174, 2003329396   */
} NS_AVAILABLE_IOS(7_0);

这篇关于Error Domain = NSOSStatusErrorDomain代码= 560030580“操作无法完成. (OSStatus错误560030580.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-23 16:35