How to translate CoreMIDI error numbers?

I’m seeing some errors in Xcode such as:

CoreMIDI error: 56 - ffffffce
CoreMIDI error: 62 - ffffffce
CoreMIDI error: 338 - ffffffce

Does anyone now what the ffffffce means?

I saw in another thread here that said that "a CoreMIDI error of ffffd5a4 was kMIDINotPermitted" - which Apple defines to -10844. So how does one get -10844 from fffd5a4?

https://developer.apple.com/documentation/coremidi/1495156-error_constants?language=objc ?

Thanks, I already had found that page. But those errors are all like -10830 to -10845. I’m not understanding how to translate something like ffffffce to one of those errors… probably I’m just missing something obvious…

maybe it’s one of those 2’s complement thing or something? or like, convert that -10830 from signed uint16 to unsigned, and see what you get? Your guess is as good as mine… :thinking:

By interpreting the highest bit as the negative sign and using 2’s complement as @matkatmusic suggested:

This only works when the integer size is set to DWORD.

Here is the translation of Core MIDI Error Constants:

kMIDIInvalidClient     | -10830 | ffffd5b2
kMIDIInvalidPort       | -10831 | ffffd5b1
kMIDIWrongEndpointType | -10832 | ffffd5b0
kMIDINoConnection      | -10833 | ffffd5af
kMIDIUnknownEndpoint   | -10834 | ffffd5ae
kMIDIUnknownProperty   | -10835 | ffffd5ad
kMIDIWrongPropertyType | -10836 | ffffd5ac
kMIDINoCurrentSetup    | -10837 | ffffd5ab
kMIDIMessageSendErr    | -10838 | ffffd5aa
kMIDIServerStartErr    | -10839 | ffffd5a9
kMIDISetupFormatErr    | -10840 | ffffd5a8
kMIDIWrongThread       | -10841 | ffffd5a7
kMIDIObjectNotFound    | -10842 | ffffd5a6
kMIDIIDNotUnique       | -10843 | ffffd5a5
kMIDINotPermitted      | -10844 | ffffd5a4
kMIDIUnknownError      | -10845 | ffffd5a3
1 Like

Thanks for that great explanation. So, if I understand this correctly, ffffffce is -50? That’s not one of those CoreMIDI Errors…

https://www.osstatus.com/ is very useful for this. -50 is kAudio_ParamError from CoreAudio

2 Likes

Thanks! Great link!