开发者

midiInGetDevCaps Midi Device Names

I've used the following code from this link.

Getting signals from a MIDI port in C#

I'm wondering what I need to add to able to get a list of device names. I've looked the MSDN website and found I need to implement midiInGetDevCaps and its a associated struct. But I've never really 开发者_运维知识库done anything with dll imports and structs before so I'm a bit lost.


Maybe you need use it like this:

MIDIINCAPS caps2;

for (uint i = 0; i < Device.iNumDevs1; i++)
{
    Device.midiOutGetDevCaps(i, out caps2, Marshal.SizeOf(output));
    comboBox2.Items.Add(caps2.szPname);
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜