尝试实现 MIDIReceived 但我不知道结果发送到哪里
我想在 Objective C 程序中实现 MIDIReceived:
extern OSStatus MIDIReceived(MIDIEndpointRef src,const MIDIPacketList *pktlist);
一旦发送了 src 和 pktlist 变量,我应该将代码放在哪里?
我一直在尝试阅读代码的 extern OSStatus 部分,但我找不到任何内容。任何朝着正确方向前进的障碍将不胜感激。
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 be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
extern
声明只是向编译器暗示某处存在具有该定义的函数。您可以将该代码放在其他任何地方,但它至少必须位于某个地方,否则您将在构建过程中收到链接器错误。有关更多信息,我建议阅读以下内容:
至于
OSStatus
,这只是 OSX 上的返回代码。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:
As for
OSStatus
, that's just a return code on OSX.