4

I faced with issue when the AudioOutputUnitStart failed on start recording.

!!! I have already found the root cause without this returned code: it happens because of AVAudioSessionCategory was set incorrectly. !!!

But I spend a lot of time to find what means OSStatus = -66637, I also tried to convert this message to hex, byte(0xFFFEFBB3 = 11111111 11111110 11111011 10110011)

I know about this site: https://www.osstatus.com but there is no info about -66637(in all types of conversion) Also I have tried macerror, but there are no codes for iOS.

Could someone help to find what means -66637?

And logs in our project was done in printf format, so I print OSStatus like this: "%d",status, maybe it is not correct, could someone suggest the best way to print OSStatus from c++ code?

This question was very useful to me: How do you convert an IPhone OSStatus code to something useful? but even with all answers which was there, I couldn't find the one which could help me.

Community
  • 1
  • 1
  • I'd start by finding the header file where the function is defined and have a look around for *localized* (to the framework) status codes. There is no one-stop-shop for status codes... – trojanfoe Mar 11 '16 at 10:11
  • Suggestions to improve your question to assist the SO community help you find a solution... you mention you're programming iOS, so include the relevant lines of the error message in context, instead of just `OSStatus = -66637`; include the relevant lines of code you've tried; don't abbreviate words (mb). – andrewbuilder Mar 11 '16 at 10:17
  • @andrewbuilder, thank you for your advice, but as I mentioned earlier I have already found the solution, I just need to find what means OSStatus = -66637 and the best way to print OSStatus from c++ code. – Daniil Privalov Mar 11 '16 at 12:49

1 Answers1

2

I got -66637, when I tried to start recording by set AVAudioSessionCategoryPlayback. Changing to AVAudioSessionCategoryPlayAndRecord the code return 0.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158