⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 midi_dec.h

📁 一个操作系统源代码 用于嵌入式设备 在Vc++环境下仿真 成功移植到多款处理器上
💻 H
字号:
#ifndef	MIDIHEAD_H
#define	MIDIHEAD_H

#include <asixwin.h>
#include <asixapp.h>

#define	NO_MIDI_ERROR		0
#define	NOT_MIDI_FILE		0x0001
#define UNKNOWN_TYPE		0x0002
#define UNSUPPORT_TYPE		0x0004
#define	TRACK_NUM_ERROR		0x0008
#define	TRACK_ERROR			0x0010
#define	SYSEX_ERROR			0x0020
#define	RUN_STATUS_ERROR	0x0040
#define	BAD_BYTE			0x0080
#define	TRACK_END_ERROR		0x0100


struct midi_event
{
//	U8		note_tamber;		//chose yin se
	U8		note_symbol;
	U32		delta_time;
	struct	midi_event	 *next;
};

typedef struct midi_event	MIDI_EVENT_STRU;

typedef	struct
{
	U32	MThd;			//The first 4 bytes means the files type
	U32	length;			//The f0llowing 4 bytes are the chunk's length
	U16	midi_type;		//the type of midi file ,format 0 or format 1
	U16	track_num;		//specifying the numbers of the track;
	S16	division;		//when the msb is 0,it represents the ticks per quarter note;
						//1---SMPTE(it specifies the meaning of delta-time)
}HEAD_CHUNK;

typedef	struct
{
	U32	Mtrk;			//the first 4 bytes means the begining of the track
	U32	length;			//the f0llowing 4 bytes are the chunk's length
						//this struct do not include  the event	list
}TRACK_CHUNK;

extern	MIDI_EVENT_STRU * midi_decode( U32 Midi_Pointer );

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -