📄 smf.h
字号:
/* * srgplay - MIDI file player * Copyright (C) 1998,1999 SAKAI Katsuya * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef __SMF_FORMAT_H_#define __SMF_FORMAT_H_#define META_EVENT 0xFF#define META_TEMPO 0x51#define META_TRACKEND 0x2F#define META_PORT_CHANGE 0x21class SMF_Chunk {public: SMF_Chunk(){Index=0; Data=0;} ~SMF_Chunk(){if(Data!=0) delete Data; Data=0;} char Type[5]; u_long Length; u_char *Data;protected: u_long ReadVarLen(); u_long ReadLen(int); u_long Index;};class SMF_Header : public SMF_Chunk {public: u_char Format; long NumOfTrack; long Timebase;};class SMF_Track : public SMF_Chunk {public: void init(); int playaEvent(); u_long tick(){ return Tick; } long Number;protected: SMF_Header *Header; u_char Port; u_char LocalLastStatus[16]; u_long Tick;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -