弑天下
那是MIDI文件里的数据了,你需要分析MIDI文件结构,读出它的数据,把数据缓冲区赋给lpData。有个例子是自己写数据的:
unsigned long Phrase[] = {0, 0, ((unsigned long)MEVT_LONGMSG<<24) | 8, 0x047F7FF0, 0xF77F7F01,
0, 0, ((unsigned long)MEVT_TEMPO<<24) | 0x0007A120,
0, 0, 0x007F3C90,
48, 0, 0x00003C90,
0, 0, 0x007F3C90,
48, 0, 0x00003C90,
0, 0, 0x007F4390,
48, 0, 0x00004390,
0, 0, 0x007F4390,
48, 0, 0x00004390,
0, 0, 0x007F4590,
48, 0, 0x00004590,
0, 0, 0x007F4590,
48, 0, 0x00004590,
0, 0, 0x007F4390,
86, 0, 0x00004390,
10, 0, 0x007F4190,
48, 0, 0x00004190,
0, 0, 0x007F4190,
48, 0, 0x00004190,
0, 0, 0x007F4090,
48, 0, 0x00004090,
0, 0, 0x007F4090,
48, 0, 0x00004090,
0, 0, 0x007F3E90,
48, 0, 0x00003E90,
0, 0, 0x007F3E90,
48, 0, 0x00003E90,
0, 0, 0x007F3C90,
96, 0, 0x00003C90};
midiHdr.lpData = (LPBYTE)&Phrase[0];
midiHdr.dwBufferLength = midiHdr.dwBytesRecorded = sizeof(Phrase);
midiHdr.dwFlags = 0;