Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2043527
  • 博文数量: 519
  • 博客积分: 10070
  • 博客等级: 上将
  • 技术积分: 3985
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-29 14:05
个人简介

只问耕耘

文章分类

全部博文(519)

文章存档

2016年(1)

2013年(5)

2011年(46)

2010年(220)

2009年(51)

2008年(39)

2007年(141)

2006年(16)

我的朋友

分类: WINDOWS

2010-03-25 11:39:20

Using midiOutShortMsg to Send Individual MIDI Messages
The following example uses the midiOutShortMsg function to send a specified MIDI event to a given MIDI output device:
Copy Code
UINT sendMIDIEvent(HMIDIOUT hmo, BYTE bStatus, BYTE bData1,
    BYTE bData2)
{
    union {
        DWORD dwData;
        BYTE bData[4];
    } u;
 
    // Construct the MIDI message.
 
    u.bData[0] = bStatus;  // MIDI status byte
    u.bData[1] = bData1;   // first MIDI data byte
    u.bData[2] = bData2;   // second MIDI data byte
    u.bData[3] = 0;
 
    // Send the message.
    return midiOutShortMsg(hmo, u.dwData);
}
Note  MIDI output drivers are not required to verify data before sending it to an output port. Applications must ensure that only valid data is sent.
 
 
阅读(742) | 评论(0) | 转发(0) |
0

上一篇:AoGo汇编小站

下一篇:Detecting a Sound Blaster

给主人留下些什么吧!~~