annotate include/mikmod.h @ 17:80fa6dd10e14

Fix some C++ 'ism's
author darius
date Thu, 23 Apr 1998 22:54:49 +0000
parents 55420dceb8e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
2 #ifndef MIKMOD_H
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
3 #define MIKMOD_H
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
4
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
5 #include "mmio.h"
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
6
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
7 #ifdef __cplusplus
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
8 extern "C" {
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
9 #endif
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
10
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
11
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
12 #define MUTE_EXCLUSIVE 32000
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
13 #define MUTE_INCLUSIVE 32001
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
14
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
15 #define PAN_LEFT 0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
16 #define PAN_CENTER 128
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
17 #define PAN_RIGHT 255
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
18 #define PAN_SURROUND 512 // panning value for Dolby Surround
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
19
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
20
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
21 #define MikMod_RegisterDriver(x) MD_RegisterDriver(&x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
22 #define MikMod_RegisterLoader(x) ML_RegisterLoader(&x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
23 #define MikMod_RegisterErrorHandler(x) _mm_RegisterErrorHandler(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
24
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
25
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
26 // The following #define macros are for retaining API compatiability
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
27 // with the beta version of MikMod 3.0, and are TEMPORARY! They WILL
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
28 // be removed in the future!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
29
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
30 #define MD_RegisterPlayer(x) MikMod_RegisterPlayer(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
31 #define MD_Init MikMod_Init
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
32 #define MD_Exit MikMod_Exit
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
33 #define MD_Update MikMod_Update
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
34 #define ML_Free(x) MikMod_FreeSong(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
35 #define MD_SetNumChannels(x,y) MikMod_SetNumVoices(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
36 #define MD_SetNumVoices(x,y) MikMod_SetNumVoices(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
37 #define MD_PlayStart MikMod_EnableOutput
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
38 #define MD_PlayStop MikMod_DisableOutput
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
39
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
40 #define MD_VoiceSetVolume(x,y) Voice_SetVolume(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
41 #define MD_VoiceSetFrequency(x,y) Voice_SetFrequency(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
42 #define MD_VoiceSetPanning(x,y) Voice_SetPanning(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
43 #define MD_VoicePlay(x,y,z) Voice_Play(x,y,z)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
44 #define MD_VoiceStop(x) Voice_Stop(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
45 #define MD_VoiceReleaseSustain(x) Voice_ReleaseSustain(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
46 #define MD_VoiceStopped(x) Voice_Stopped(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
47 #define MD_VoiceGetPosition(x) Voice_GetPosition(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
48 #define MD_VoiceRealVolume(x) Voice_RealVolume(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
49
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
50
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
51 #define SFX_CRITICAL 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
52
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
53
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
54 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
55 ****** mikmod types: ******************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
56 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
57
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
58 // Sample format [loading and in-memory] flags:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
59 #define SF_16BITS 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
60 #define SF_SIGNED 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
61 #define SF_STEREO 4
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
62 #define SF_DELTA 8
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
63 #define SF_BIG_ENDIAN 16
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
64
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
65 // General Playback flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
66
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
67 #define SF_LOOP 32
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
68 #define SF_BIDI 64
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
69 #define SF_SUSTAIN 128
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
70 #define SF_REVERSE 256
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
71
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
72 // Module-only Playback Flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
73
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
74 #define SF_OWNPAN 512
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
75 #define SF_UST_LOOP 1024
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
76
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
77
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
78 typedef struct SAMPLE
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
79 { ULONG speed; // Base playing speed/frequency of note (Middle C in player)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
80 UBYTE volume; // volume 0-64
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
81 UWORD panning; // panning (0-255 or PAN_SURROUND)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
82 ULONG length; // length of sample (in samples!)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
83 ULONG loopstart; // repeat position (relative to start, in samples)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
84 ULONG loopend; // repeat end
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
85 ULONG susbegin; // sustain loop begin (in samples) \ Not Supported
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
86 ULONG susend; // sustain loop end / Yet!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
87
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
88 UWORD flags; // sample format in memory
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
89
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
90 // Variables used by the module player only! (ignored for sound effects)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
91
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
92 UBYTE globvol; // global volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
93 UBYTE vibflags; // autovibrato flag stuffs
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
94 UBYTE vibtype; // Vibratos moved from INSTRUMENT to SAMPLE
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
95 UBYTE vibsweep;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
96 UBYTE vibdepth;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
97 UBYTE vibrate;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
98
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
99 CHAR *samplename; // name of the sample
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
100
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
101 // Values used internally only (not saved in disk formats)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
102
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
103 UWORD avibpos; // autovibrato pos [player use]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
104 UBYTE divfactor; // for sample scaling (maintains proper period slides)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
105 ULONG seekpos; // seek position in file
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
106 SWORD handle; // sample handle used by individual drivers
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
107 } SAMPLE;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
108
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
109
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
110
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
111 // --> Struct : SAMPLOAD
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
112 // This is a handle of sorts attached to any sample registered with
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
113 // SL_RegisterSample. Generally, this only need be used or changed by the
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
114 // loaders and drivers of mikmod.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
115
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
116 typedef struct SAMPLOAD
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
117 { struct SAMPLOAD *next;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
118
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
119 ULONG length; // length of sample (in samples!)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
120 ULONG loopstart; // repeat position (relative to start, in samples)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
121 ULONG loopend; // repeat end
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
122
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
123 UWORD infmt, outfmt;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
124 int scalefactor;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
125 SAMPLE *sample;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
126 FILE *fp;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
127 } SAMPLOAD;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
128
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
129 extern void SL_HalveSample(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
130 extern void SL_Sample8to16(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
131 extern void SL_Sample16to8(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
132 extern void SL_SampleSigned(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
133 extern void SL_SampleUnsigned(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
134 extern BOOL SL_LoadSamples(void); // Returns 1 on error!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
135 extern SAMPLOAD *SL_RegisterSample(SAMPLE *s, int type, FILE *fp); // Returns 1 on error!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
136 extern void SL_Load(void *buffer, SAMPLOAD *smp, int length);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
137 extern BOOL SL_Init(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
138 extern void SL_Exit(SAMPLOAD *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
139
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
140
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
141 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
142 ****** Wavload stuff: *****************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
143 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
144
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
145 SAMPLE *WAV_LoadFP(FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
146 SAMPLE *WAV_LoadFN(CHAR *filename);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
147 void WAV_Free(SAMPLE *si);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
148
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
149
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
150 #include "ptform.h"
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
151
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
152
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
153 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
154 ****** Driver stuff: ******************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
155 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
156
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
157 // max. number of handles a driver has to provide. (not strict)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
158
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
159 #define MAXSAMPLEHANDLES 384
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
160
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
161
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
162 enum
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
163 { MD_MUSIC = 0,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
164 MD_SNDFX
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
165 };
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
166
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
167 enum
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
168 { MD_HARDWARE = 0,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
169 MD_SOFTWARE
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
170 };
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
171
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
172
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
173 // possible mixing mode bits:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
174 // --------------------------
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
175 // These take effect only after MikMod_Init or MikMod_Reset.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
176
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
177 #define DMODE_16BITS 1 // enable 16 bit output
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
178 #define DMODE_SURROUND 2 // enable Dolby surround sound (not yet supported)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
179 #define DMODE_SOFT_SNDFX 4 // Process sound effects via software mixer (not yet supported)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
180 #define DMODE_SOFT_MUSIC 8 // Process music via software mixer (not yet supported)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
181
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
182 // These take effect immidiately.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
183
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
184 #define DMODE_STEREO 16 // enable stereo output
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
185 #define DMODE_REVERSE 32 // reverse stereo
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
186 #define DMODE_INTERP 64 // enable interpolation (not yet supported)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
187
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
188
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
189 // driver structure:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
190
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
191 typedef struct MDRIVER
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
192 { struct MDRIVER *next;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
193 CHAR *Name;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
194 CHAR *Version;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
195 UBYTE HardVoiceLimit, // Limit of hardware mixer voices for this driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
196 SoftVoiceLimit; // Limit of software mixer voices for this driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
197
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
198 BOOL (*IsPresent) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
199 SWORD (*SampleLoad) (SAMPLOAD *s, int type, FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
200 void (*SampleUnLoad) (SWORD handle);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
201 ULONG (*FreeSampleSpace) (int type);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
202 ULONG (*RealSampleLength) (int type, SAMPLE *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
203 BOOL (*Init) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
204 void (*Exit) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
205 BOOL (*Reset) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
206 BOOL (*SetNumVoices) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
207 BOOL (*PlayStart) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
208 void (*PlayStop) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
209 void (*Update) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
210 void (*VoiceSetVolume) (UBYTE voice, UWORD vol);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
211 void (*VoiceSetFrequency) (UBYTE voice, ULONG frq);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
212 void (*VoiceSetPanning) (UBYTE voice, ULONG pan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
213 void (*VoicePlay) (UBYTE voice, SWORD handle, ULONG start, ULONG size, ULONG reppos, ULONG repend, UWORD flags);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
214 void (*VoiceStop) (UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
215 BOOL (*VoiceStopped) (UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
216 void (*VoiceReleaseSustain)(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
217 SLONG (*VoiceGetPosition) (UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
218 ULONG (*VoiceRealVolume) (UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
219
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
220 BOOL (*StreamInit) (ULONG speed, UWORD flags);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
221 void (*StreamExit) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
222 void (*StreamSetSpeed) (ULONG speed);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
223 SLONG (*StreamGetPosition) (void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
224 void (*StreamLoadFP) (FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
225 } MDRIVER;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
226
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
227
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
228 // These variables can be changed at ANY time and results
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
229 // will be immidiate:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
230
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
231 extern UBYTE md_bpm; // current song / hardware BPM rate
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
232 extern UBYTE md_volume; // Global sound volume (0-128)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
233 extern UBYTE md_musicvolume; // volume of song
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
234 extern UBYTE md_sndfxvolume; // volume of sound effects
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
235 extern UBYTE md_reverb; // 0 = none; 15 = chaos
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
236 extern UBYTE md_pansep; // 0 = mono; 128 == 100% (full left/right)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
237
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
238
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
239 // The variables below can be changed at any time, but changes will
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
240 // not be implimented until MikMod_Reset is called. A call to
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
241 // MikMod_Reset may result in a skip or pop in audio (depending on
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
242 // the soundcard driver and the settings changed).
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
243
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
244 extern UWORD md_device; // Device. 0 = autodetect, other # depend on driver register order.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
245 extern UWORD md_mixfreq; // mixing frequency. Valid 5000 -> 44100
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
246 extern UWORD md_dmabufsize; // DMA buffer size. Valid 512 -> 32000
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
247 extern UWORD md_mode; // Mode. See DMODE_? flags above
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
248
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
249
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
250 // Variables below can be changed via MD_SetNumVoices at any time.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
251 // However, a call to MD_SetNumVoicess while the driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
252 // is active will cause the sound to skip slightly.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
253
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
254 extern UBYTE md_numchn, // number of song + sound effects voices
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
255 md_sngchn, // number of song voices
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
256 md_sfxchn, // number of sound effects voices
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
257 md_hardchn, // number of hardware mixed voices
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
258 md_softchn; // number of software mixed voices
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
259
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
260
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
261 // Following variables should not be changed!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
262 extern MDRIVER *md_driver; // Current driver in use. See MDRIVER struct
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
263 // above for structure info contents.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
264
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
265 // This is for use by the hardware drivers only. It points to the
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
266 // registered tickhandler function.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
267 extern void (*md_player)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
268
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
269
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
270 // main driver prototypes:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
271
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
272 extern void MikMod_RegisterAllDrivers(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
273 extern void MikMod_RegisterAllLoaders(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
274
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
275 extern BOOL MikMod_Init(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
276 extern void MikMod_Exit(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
277 extern BOOL MikMod_Reset(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
278 extern int MikMod_PlaySample(SAMPLE *s, ULONG start, UBYTE flags);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
279 extern BOOL MikMod_SetNumVoices(int music, int sndfx);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
280 extern BOOL MikMod_Active(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
281 extern BOOL MikMod_EnableOutput(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
282 extern void MikMod_DisableOutput(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
283 extern void MikMod_RegisterPlayer(void (*plr)(void));
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
284 extern void MikMod_Update(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
285
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
286 extern void Voice_SetVolume(int voice, UWORD ivol);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
287 extern void Voice_SetFrequency(int voice, ULONG frq);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
288 extern void Voice_SetPanning(int voice, ULONG pan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
289 extern void Voice_Play(int voice,SAMPLE *s, ULONG start);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
290 extern void Voice_Stop(int voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
291 extern void Voice_ReleaseSustain(int voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
292 extern BOOL Voice_Stopped(int voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
293 extern SLONG Voice_GetPosition(int voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
294 extern ULONG Voice_RealVolume(int voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
295
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
296 extern void MD_InfoDriver(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
297 extern void MD_RegisterDriver(MDRIVER *drv);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
298 extern SWORD MD_SampleLoad(SAMPLOAD *s, int type, FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
299 extern void MD_SampleUnLoad(SWORD handle);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
300 extern void MD_SetBPM(UBYTE bpm);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
301 extern ULONG MD_SampleSpace(int type);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
302 extern ULONG MD_SampleLength(int type, SAMPLE *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
303
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
304 // Declare external drivers:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
305
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
306 extern MDRIVER drv_awe; // experimental SB-AWE driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
307 extern MDRIVER drv_gus; // gravis ultrasound driver [hardware / software mixing]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
308 extern MDRIVER drv_gus2; // gravis ultrasound driver [hardware mixing only]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
309 extern MDRIVER drv_sb; // soundblaster 1.5 / 2.0 DSP driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
310 extern MDRIVER drv_sbpro; // soundblaster Pro DSP driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
311 extern MDRIVER drv_sb16; // soundblaster 16 DSP driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
312 extern MDRIVER drv_ss; // ensoniq soundscape driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
313 extern MDRIVER drv_pas; // PAS16 driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
314 extern MDRIVER drv_wss; // Windows Sound System driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
315 extern MDRIVER drv_nos; // nosound driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
316 extern MDRIVER drv_raw; // raw file output driver [music.raw]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
317 extern MDRIVER drv_wav; // RIFF WAVE file output driver [music.wav]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
318
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
319 extern MDRIVER drv_w95; // win95 driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
320 extern MDRIVER drv_oss; // linux voxware driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
321 extern MDRIVER drv_AF; // Dec Alpha AudioFile driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
322 extern MDRIVER drv_sun; // Sun driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
323 extern MDRIVER drv_os2; // Os2 driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
324 extern MDRIVER drv_hp; // HP-UX /dev/audio driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
325 extern MDRIVER drv_aix; // AIX audio-device driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
326 extern MDRIVER drv_sgi; // SGI audio-device driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
327 extern MDRIVER drv_tim; // timing driver
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
328 extern MDRIVER drv_ultra; // ultra driver for linux
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
329
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
330
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
331 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
332 ****** Streaming Audio stuff: *********************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
333 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
334
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
335
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
336 typedef struct MSTREAM
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
337 { struct MSTREAM *next;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
338 CHAR *type;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
339 CHAR *version;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
340 BOOL (*Init)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
341 BOOL (*Test)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
342 BOOL (*Load)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
343 void (*Cleanup)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
344 } MSTREAM;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
345
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
346
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
347 extern int stream_bufsize;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
348 extern FILE *stream_fp;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
349 extern SLONG stream_seekpos;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
350 extern SLONG stream_reppos;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
351
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
352
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
353 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
354 ****** Virtual channel stuff: *********************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
355 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
356
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
357 extern BOOL VC_Init(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
358 extern void VC_Exit(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
359 extern BOOL VC_SetNumVoices(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
360 extern ULONG VC_SampleSpace(int type);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
361 extern ULONG VC_SampleLength(int type, SAMPLE *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
362
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
363 extern BOOL VC_PlayStart(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
364 extern void VC_PlayStop(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
365
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
366 extern SWORD VC_SampleLoad(SAMPLOAD *sload, int type, FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
367 extern void VC_SampleUnload(SWORD handle);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
368
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
369 extern void VC_WriteSamples(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
370 extern ULONG VC_WriteBytes(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
371 extern void VC_SilenceBytes(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
372
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
373 extern void VC_VoiceSetVolume(UBYTE voice, UWORD vol);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
374 extern void VC_VoiceSetFrequency(UBYTE voice, ULONG frq);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
375 extern void VC_VoiceSetPanning(UBYTE voice, ULONG pan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
376 extern void VC_VoicePlay(UBYTE voice,SWORD handle,ULONG start,ULONG size,ULONG reppos,ULONG repend,UWORD flags);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
377
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
378 extern void VC_VoiceStop(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
379 extern BOOL VC_VoiceStopped(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
380 extern void VC_VoiceReleaseSustain(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
381 extern SLONG VC_VoiceGetPosition(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
382 extern ULONG VC_VoiceRealVolume(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
383
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
384
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
385 extern BOOL VC2_Init(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
386 extern void VC2_Exit(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
387 extern BOOL VC2_SetNumVoices(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
388 extern ULONG VC2_SampleSpace(int type);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
389 extern ULONG VC2_SampleLength(int type, SAMPLE *s);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
390
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
391 extern BOOL VC2_PlayStart(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
392 extern void VC2_PlayStop(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
393
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
394 extern SWORD VC2_SampleLoad(SAMPLOAD *sload, int type, FILE *fp);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
395 extern void VC2_SampleUnload(SWORD handle);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
396
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
397 extern void VC2_WriteSamples(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
398 extern ULONG VC2_WriteBytes(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
399 extern void VC2_SilenceBytes(SBYTE *buf,ULONG todo);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
400
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
401 extern void VC2_VoiceSetVolume(UBYTE voice, UWORD vol);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
402 extern void VC2_VoiceSetFrequency(UBYTE voice, ULONG frq);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
403 extern void VC2_VoiceSetPanning(UBYTE voice, ULONG pan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
404 extern void VC2_VoicePlay(UBYTE voice,SWORD handle,ULONG start,ULONG size,ULONG reppos,ULONG repend,UWORD flags);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
405
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
406 extern void VC2_VoiceStop(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
407 extern BOOL VC2_VoiceStopped(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
408 extern void VC2_VoiceReleaseSustain(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
409 extern SLONG VC2_VoiceGetPosition(UBYTE voice);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
410
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
411 #ifdef __cplusplus
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
412 }
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
413 #endif
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
414
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
415 #endif