MIDI错误消息 [英] MIDI error messages

查看:226
本文介绍了MIDI错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我一直遇到导致问题的MIDI输出错误.我发现的信息列出了5个错误,但是甚至没有数字地验证数字代表的错误. 4和5?

Hey guys. I have been running into a MIDI out open error that is causing problems. The info I have found lists 5 errors, but does not even verify numerically which error the number would represent. 4 and 5?

我正在发送一条消息,然后它出错.

I am sending one message and then it errors.  

音量

Public hMidiOut As Long

调用 midiOutOpen(hMidiOut,DevID,0,0,CALLBACK_NULL)

CallmidiOutOpen(hMidiOut, DevID, 0, 0, CALLBACK_NULL)

致电midiOutShortMsg(hMidiOut,msg)

Call midiOutShortMsg(hMidiOut, msg)

返回错误4

请注意打开和关闭

Public hMIDIInPtr As IntPtr

,DevID,0、0,CALLBACK_NULL)

CallmidiOutOpen(hMIDIInPtr, DevID, 0, 0, CALLBACK_NULL)

呼叫midiOutShortMsg(hMIDIOutPtr,msg)

Call midiOutShortMsg(hMIDIOutPtr, msg)


为什么这些调用必须针对不同的对象(长型和指针型)?这是我得到任何东西的唯一方法.最近,它变得更加不合作.它奏效了,但是更改一定会使它变得烦躁.当我的表格打开时 我在ins/outs菜单中进行填充,然后就可以调用该端口了.这很多不一致.我打开了每次通话使用的端口,只要我有选择的端口就应该打开.但是最近我只接到一个电话,然后出现错误 跟随.在撰写本文时,我正在测试.注意打开是正确的.错误4是什么,导致错误的原因是什么?

Why do these calls have to different (long and pointer) objects?   This is the only way I get anything.  It has recently been more uncooperative.  It has worked,  but changes must have made it irritable.  When my form opens I populate my ins/outs menu and then I should be able to call that port.  It is inconsistent a lot.  I open the port I am using every call so as long as I have the selected port it should open.  But recently I only get one call and then errors follow.  As I was writing this I was testing.  The Note On is correct.  What would error 4 be and any ideas what is causing it?

推荐答案

仔细检查您的函数声明.
http://www.pinvoke.net/default.aspx/winmm.midioutopen
http://www.pinvoke.net/default.aspx/winmm/midiOutShortMsg.html

Double check your function declarations.
http://www.pinvoke.net/default.aspx/winmm.midioutopen
http://www.pinvoke.net/default.aspx/winmm/midiOutShortMsg.html

使用带文字的类型说明符来强制使用正确的类型并警告您输入错误.
https://msdn.microsoft.com/en-us/library/s9cz43ek.aspx

Use type specifiers with literals to force the correct type and to alert you to typing errors.
https://msdn.microsoft.com/en-us/library/s9cz43ek.aspx


这篇关于MIDI错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆