开发者

Trying to implement MIDIReceived but I don't know where the results are sent

开发者 https://www.devze.com 2023-02-01 17:08 出处:网络
I would like to implement MIDIReceived in a Objective C Program: extern OSStatus MIDIReceived(MIDIEndpointRef src,const MIDIPacketList *pktlist);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消