PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
modplay.h
Go to the documentation of this file.
1 #ifndef _MODPLAY_H
2 #define _MODPLAY_H
3 
4 #ifndef NO_PSX_LIB
5  #include <psx.h>
6 #endif
7 
11 {
13 };
14 
15 typedef struct
16 {
17  char name[32];
18  unsigned int length; // Length in bytes
19  char finetune;
20  unsigned char volume;
21  unsigned int repeat_off;
22  unsigned int repeat_len;
23  unsigned char bits;
24  unsigned char data_type;
25  unsigned char *data;
26 }ModSample;
27 
30 typedef struct
31 {
32  char name[64];
34  unsigned char sample_ids[8];
36 
39 typedef struct
40 {
42  char title[32];
54  unsigned char song_pos_num;
56  unsigned char pattern_tbl[256];
58  unsigned char pattern_row_num[256];
60  char id[4];
64  unsigned char *pattern_data;
66  int fmt;
67 
69  unsigned char song_pos;
71  unsigned char pat_pos;
75  unsigned char beats_minute;
77  unsigned char ticks_division;
79  unsigned char cur_tick;
81  unsigned short old_periods[8];
83  unsigned char old_samples[8];
86  short transpose;
87 }ModMusic;
88 
91 {
94 };
95 
115 ModMusic *MODLoadEx(void *d, unsigned int flags);
116 
125 ModMusic *MODLoad(void *d);
126 
143 void MODPlay(ModMusic *m,int *t);
144 
149 void MODStop(ModMusic *m);
150 
155 void MODRewind(ModMusic *m);
156 
166 int MODUploadSamples(ModMusic *m, int base_addr);
167 
179 void MODSetBaseVoice(int base_voice);
180 
190 void MODSetTranspose(ModMusic *m, short transpose);
191 
192 // Internal function... THIS SHOULD NOT BE HERE, GET RID OF THIS HERE!!
193 
202 int MOD4PSX_Upload(void *d, int base_addr);
203 
209 void MODUnload(ModMusic *m);
210 
216 void MODSetMaxVolume(unsigned short max_volume);
217 
223 void MODSetMono(int value);
224 
225 #endif