尝试实现 MIDIReceived 但我不知道结果发送到哪里

发布于 2024-10-09 06:36:41 字数 261 浏览 0 评论 0原文

我想在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜嗑 2024-10-16 06:36:41

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文