当我播放文件.mid时,我得到元歌词的字节,但我不知道如何从这个字节中获取元歌词。任何人都可以帮助我做到这一点吗?感谢所有评论。
void MyMIDIReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon) {
MIDIPacket *packet = (MIDIPacket *)pktlist->packet;
for (int i=0; i < pktlist->numPackets; i++) {
Byte midiStatus = packet->data[4];
Byte midiCommand = midiStatus >> 4;
if (midiCommand == 0x05){
NSLog(@"meta event 0x%x",midiCommand1);
//how to get meta text here?
}
}