I would like to implement MIDIReceived in a Objective C Program:
extern OSStatus MIDIReceived(MIDIEndpointRef src,const MIDIPacketList *pktlist);
Where would I put the code to utilize the src and pktlist variables once they are sent?
I've been trying to read about the extern OSStatus part of the code but I havn't been able to find anything. Any bumps in the right direction would开发者_JAVA技巧 be greatly appreciated.
The extern
declaration just hints to the compiler that there exists somewhere a function with that definition. You can put that code anywhere else, but it at least has to be somewhere or else you'll get a linker error during building.
For more information, I suggest reading up on the following:
- http://en.wikipedia.org/wiki/External_variable#Definition.2C_declaration_and_the_extern_keyword
- http://www.geeksforgeeks.org/archives/840
As for OSStatus
, that's just a return code on OSX.
精彩评论