OSStatus NSOSStatusErrorDomain

拜拜、爱过 提交于 2020-01-01 09:26:11

问题


I received the following error when I get the property using

AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareSampleRate,&size,
                                      &myAudioDescription.mSampleRate)

Error Produced by above statement is

Error Domain=NSOSStatusErrorDomain Code=560557673 "The operation couldn’t be completed. (OSStatus error 560557673.)"

Now, here what does 560557673 mean and where can I find its explanation?

Documentation only provides NSOSStatusErrorDomain as one of the errors.


回答1:


That code means the property data size was not correct.

OSStatus is a type commonly used for error codes in OS X and iOS. If the magnitude of the code is less than 1 million, then the code is probably listed in MacErrors.h in the CarbonCore framework. Otherwise, it is probably a four-character code listed in the same header as the function which returned it. You can find the header of a function by command-clicking it in Xcode. The codes will most likely be listed near the top, grouped together. To convert the number to a code, use the Calculator app in Developer view to convert it to hexadecimal and convert each byte to a character.



来源:https://stackoverflow.com/questions/12079144/osstatus-nsosstatuserrordomain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!