1 #ifndef GPLAY_H 2 #define GPLAY_H 3 4 #define PLAY_PLAYING 0x00 5 #define PLAY_BEGINNING 0x01 6 #define PLAY_POS 0x02 7 #define PLAY_PATTERN 0x03 8 #define PLAY_STOP 0x04 9 #define PLAY_STOPPED 0x80 10 11 typedef struct 12 { 13 unsigned char trans; 14 unsigned char instr; 15 unsigned char note; 16 unsigned char lastnote; 17 unsigned char newnote; 18 unsigned pattptr; 19 unsigned char pattnum; 20 unsigned char songptr; 21 unsigned char repeat; 22 unsigned short freq; 23 unsigned char gate; 24 unsigned char wave; 25 unsigned short pulse; 26 unsigned char ptr[2]; 27 unsigned char pulsetime; 28 unsigned char wavetime; 29 unsigned char vibtime; 30 unsigned char vibdelay; 31 unsigned char command; 32 unsigned char cmddata; 33 unsigned char newcommand; 34 unsigned char newcmddata; 35 unsigned char tick; 36 unsigned char tempo; 37 unsigned char mute; 38 unsigned char advance; 39 unsigned char gatetimer; 40 } CHN; 41 42 #ifndef GPLAY_C 43 extern CHN chn[MAX_CHN]; 44 extern unsigned char masterfader; 45 extern unsigned char freqtbllo[]; 46 extern unsigned char freqtblhi[]; 47 extern int lastsonginit; 48 #endif 49 50 void initchannels(void); 51 void initsong(int num, int playmode); 52 void initsongpos(int num, int playmode, int pattpos); 53 void stopsong(void); 54 void rewindsong(void); 55 void playtestnote(int note, int ins, int chnnum); 56 void releasenote(int chnnum); 57 void mutechannel(int chnnum); 58 int isplaying(void); 59 void playroutine(void); 60 61 #endif 62