rev |
line source |
nuclear@0
|
1 //==========================================================================================
|
nuclear@0
|
2 // FMOD Main header file. Copyright (c), FireLight Multimedia 1999-2000.
|
nuclear@0
|
3 //==========================================================================================
|
nuclear@0
|
4
|
nuclear@0
|
5 #ifndef _FMOD_H_
|
nuclear@0
|
6 #define _FMOD_H_
|
nuclear@0
|
7
|
nuclear@0
|
8 //===============================================================================================
|
nuclear@0
|
9 // DEFINITIONS
|
nuclear@0
|
10 //===============================================================================================
|
nuclear@0
|
11
|
nuclear@0
|
12 #if defined(__GNUC__) && defined(WIN32)
|
nuclear@0
|
13 #define _cdecl
|
nuclear@0
|
14 #endif /* defined(__GNUC__) && defined(WIN32) */
|
nuclear@0
|
15
|
nuclear@0
|
16 #if defined(PLATFORM_LINUX)
|
nuclear@0
|
17 #define _cdecl
|
nuclear@0
|
18 #define _stdcall
|
nuclear@0
|
19 #define __cdecl
|
nuclear@0
|
20 #define __stdcall
|
nuclear@0
|
21 #define __declspec(x)
|
nuclear@0
|
22 #define __PS __attribute__((packed)) /* gcc packed */
|
nuclear@0
|
23 #else
|
nuclear@0
|
24 #define __PS /*dummy*/
|
nuclear@0
|
25 #endif
|
nuclear@0
|
26
|
nuclear@0
|
27 #define F_API _stdcall
|
nuclear@0
|
28
|
nuclear@0
|
29 #ifdef DLL_EXPORTS
|
nuclear@0
|
30 #define DLL_API __declspec(dllexport)
|
nuclear@0
|
31 #else
|
nuclear@0
|
32 #ifdef __LCC__
|
nuclear@0
|
33 #define DLL_API F_API
|
nuclear@0
|
34 #else
|
nuclear@0
|
35 #define DLL_API
|
nuclear@0
|
36 #endif // __LCC__
|
nuclear@0
|
37 #endif //DLL_EXPORTS
|
nuclear@0
|
38
|
nuclear@0
|
39
|
nuclear@0
|
40 #define FMOD_VERSION 3.32f
|
nuclear@0
|
41
|
nuclear@0
|
42
|
nuclear@0
|
43 // fmod defined types
|
nuclear@0
|
44 typedef struct FSOUND_MATERIAL FSOUND_MATERIAL;
|
nuclear@0
|
45 typedef struct FSOUND_GEOMLIST FSOUND_GEOMLIST;
|
nuclear@0
|
46 typedef struct FSOUND_SAMPLE FSOUND_SAMPLE;
|
nuclear@0
|
47 typedef struct FSOUND_STREAM FSOUND_STREAM;
|
nuclear@0
|
48 typedef struct FSOUND_DSPUNIT FSOUND_DSPUNIT;
|
nuclear@0
|
49 typedef struct FMUSIC_MODULE FMUSIC_MODULE;
|
nuclear@0
|
50
|
nuclear@0
|
51 // callback types
|
nuclear@0
|
52 typedef signed char (_cdecl *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, int param);
|
nuclear@0
|
53 typedef void * (_cdecl *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, int param);
|
nuclear@0
|
54 typedef void (_cdecl *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param);
|
nuclear@0
|
55
|
nuclear@0
|
56
|
nuclear@0
|
57 /*
|
nuclear@0
|
58 [ENUM]
|
nuclear@0
|
59 [
|
nuclear@0
|
60 [DESCRIPTION]
|
nuclear@0
|
61 On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
|
nuclear@0
|
62
|
nuclear@0
|
63 [SEE_ALSO]
|
nuclear@0
|
64 FSOUND_GetError
|
nuclear@0
|
65 ]
|
nuclear@0
|
66 */
|
nuclear@0
|
67 enum FMOD_ERRORS
|
nuclear@0
|
68 {
|
nuclear@0
|
69 FMOD_ERR_NONE, // No errors
|
nuclear@0
|
70 FMOD_ERR_BUSY, // Cannot call this command after FSOUND_Init. Call FSOUND_Close first.
|
nuclear@0
|
71 FMOD_ERR_UNINITIALIZED, // This command failed because FSOUND_Init or FSOUND_SetOutput was not called
|
nuclear@0
|
72 FMOD_ERR_INIT, // Error initializing output device.
|
nuclear@0
|
73 FMOD_ERR_ALLOCATED, // Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
|
nuclear@0
|
74 FMOD_ERR_PLAY, // Playing the sound failed.
|
nuclear@0
|
75 FMOD_ERR_OUTPUT_FORMAT, // Soundcard does not support the features needed for this soundsystem (16bit stereo output)
|
nuclear@0
|
76 FMOD_ERR_COOPERATIVELEVEL, // Error setting cooperative level for hardware.
|
nuclear@0
|
77 FMOD_ERR_CREATEBUFFER, // Error creating hardware sound buffer.
|
nuclear@0
|
78 FMOD_ERR_FILE_NOTFOUND, // File not found
|
nuclear@0
|
79 FMOD_ERR_FILE_FORMAT, // Unknown file format
|
nuclear@0
|
80 FMOD_ERR_FILE_BAD, // Error loading file
|
nuclear@0
|
81 FMOD_ERR_MEMORY, // Not enough memory
|
nuclear@0
|
82 FMOD_ERR_VERSION, // The version number of this file format is not supported
|
nuclear@0
|
83 FMOD_ERR_INVALID_PARAM, // An invalid parameter was passed to this function
|
nuclear@0
|
84 FMOD_ERR_NO_EAX, // Tried to use an EAX command on a non EAX enabled channel or output.
|
nuclear@0
|
85 FMOD_ERR_NO_EAX2, // Tried to use an advanced EAX2 command on a non EAX2 enabled channel or output.
|
nuclear@0
|
86 FMOD_ERR_CHANNEL_ALLOC, // Failed to allocate a new channel
|
nuclear@0
|
87 FMOD_ERR_RECORD, // Recording is not supported on this machine
|
nuclear@0
|
88 FMOD_ERR_MEDIAPLAYER, // Windows Media Player not installed so cant play wma or use internet streaming.
|
nuclear@0
|
89 };
|
nuclear@0
|
90
|
nuclear@0
|
91
|
nuclear@0
|
92 /*
|
nuclear@0
|
93 [ENUM]
|
nuclear@0
|
94 [
|
nuclear@0
|
95 [DESCRIPTION]
|
nuclear@0
|
96 These output types are used with FSOUND_SetOutput, to choose which output driver to use.
|
nuclear@0
|
97
|
nuclear@0
|
98 FSOUND_OUTPUT_A3D will cause FSOUND_Init to FAIL if you have not got a vortex
|
nuclear@0
|
99 based A3D card. The suggestion for this is to immediately try and reinitialize FMOD with
|
nuclear@0
|
100 FSOUND_OUTPUT_DSOUND, and if this fails, try initializing FMOD with FSOUND_OUTPUT_WAVEOUT.
|
nuclear@0
|
101
|
nuclear@0
|
102 FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
|
nuclear@0
|
103 does not support DirectX 6 Voice Manager Extensions.
|
nuclear@0
|
104
|
nuclear@0
|
105 [SEE_ALSO]
|
nuclear@0
|
106 FSOUND_SetOutput
|
nuclear@0
|
107 FSOUND_GetOutput
|
nuclear@0
|
108 ]
|
nuclear@0
|
109 */
|
nuclear@0
|
110 enum FSOUND_OUTPUTTYPES
|
nuclear@0
|
111 {
|
nuclear@0
|
112 FSOUND_OUTPUT_NOSOUND, // NoSound driver, all calls to this succeed but do nothing.
|
nuclear@0
|
113 FSOUND_OUTPUT_WINMM, // Windows Multimedia driver.
|
nuclear@0
|
114 FSOUND_OUTPUT_DSOUND, // DirectSound driver. You need this to get EAX or EAX2 support.
|
nuclear@0
|
115 FSOUND_OUTPUT_A3D, // A3D driver. You need this to get geometry support.
|
nuclear@0
|
116 FSOUND_OUTPUT_OSS, // Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers.
|
nuclear@0
|
117 FSOUND_OUTPUT_ESD, // Linux/Unix ESD (Enlightment Sound Daemon) driver.
|
nuclear@0
|
118 FSOUND_OUTPUT_ALSA // Linux Alsa driver.
|
nuclear@0
|
119 };
|
nuclear@0
|
120
|
nuclear@0
|
121
|
nuclear@0
|
122 /*
|
nuclear@0
|
123 [ENUM]
|
nuclear@0
|
124 [
|
nuclear@0
|
125 [DESCRIPTION]
|
nuclear@0
|
126 These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
|
nuclear@0
|
127 upon for other reasons using FSOUND_GetMixer.
|
nuclear@0
|
128
|
nuclear@0
|
129 [SEE_ALSO]
|
nuclear@0
|
130 FSOUND_SetMixer
|
nuclear@0
|
131 FSOUND_GetMixer
|
nuclear@0
|
132 ]
|
nuclear@0
|
133 */
|
nuclear@0
|
134 enum FSOUND_MIXERTYPES
|
nuclear@0
|
135 {
|
nuclear@0
|
136 FSOUND_MIXER_AUTODETECT, // Enables autodetection of the fastest mixer based on your cpu.
|
nuclear@0
|
137 FSOUND_MIXER_BLENDMODE, // Enables the standard non mmx, blendmode mixer.
|
nuclear@0
|
138 FSOUND_MIXER_MMXP5, // Enables the mmx, pentium optimized blendmode mixer.
|
nuclear@0
|
139 FSOUND_MIXER_MMXP6, // Enables the mmx, ppro/p2/p3 optimized mixer.
|
nuclear@0
|
140
|
nuclear@0
|
141 FSOUND_MIXER_QUALITY_AUTODETECT,// Enables autodetection of the fastest quality mixer based on your cpu.
|
nuclear@0
|
142 FSOUND_MIXER_QUALITY_FPU, // Enables the interpolating/volume ramping FPU mixer.
|
nuclear@0
|
143 FSOUND_MIXER_QUALITY_MMXP5, // Enables the interpolating/volume ramping p5 MMX mixer.
|
nuclear@0
|
144 FSOUND_MIXER_QUALITY_MMXP6, // Enables the interpolating/volume ramping ppro/p2/p3+ MMX mixer.
|
nuclear@0
|
145 };
|
nuclear@0
|
146
|
nuclear@0
|
147 /*
|
nuclear@0
|
148 [ENUM]
|
nuclear@0
|
149 [
|
nuclear@0
|
150 [DESCRIPTION]
|
nuclear@0
|
151 These definitions describe the type of song being played.
|
nuclear@0
|
152
|
nuclear@0
|
153 [SEE_ALSO]
|
nuclear@0
|
154 FMUSIC_GetType
|
nuclear@0
|
155 ]
|
nuclear@0
|
156 */
|
nuclear@0
|
157 enum FMUSIC_TYPES
|
nuclear@0
|
158 {
|
nuclear@0
|
159 FMUSIC_TYPE_NONE,
|
nuclear@0
|
160 FMUSIC_TYPE_MOD, // Protracker / Fasttracker
|
nuclear@0
|
161 FMUSIC_TYPE_S3M, // ScreamTracker 3
|
nuclear@0
|
162 FMUSIC_TYPE_XM, // FastTracker 2
|
nuclear@0
|
163 FMUSIC_TYPE_IT, // Impulse Tracker.
|
nuclear@0
|
164 FMUSIC_TYPE_MIDI, // MIDI file
|
nuclear@0
|
165 };
|
nuclear@0
|
166
|
nuclear@0
|
167
|
nuclear@0
|
168 /*
|
nuclear@0
|
169 [DEFINE_START]
|
nuclear@0
|
170 [
|
nuclear@0
|
171 [NAME]
|
nuclear@0
|
172 FSOUND_DSP_PRIORITIES
|
nuclear@0
|
173
|
nuclear@0
|
174 [DESCRIPTION]
|
nuclear@0
|
175 These default priorities are
|
nuclear@0
|
176
|
nuclear@0
|
177 [SEE_ALSO]
|
nuclear@0
|
178 FSOUND_DSP_Create
|
nuclear@0
|
179 FSOUND_DSP_SetPriority
|
nuclear@0
|
180 ]
|
nuclear@0
|
181 */
|
nuclear@0
|
182 #define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT 0 // DSP CLEAR unit - done first
|
nuclear@0
|
183 #define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT 100 // DSP SFX unit - done second
|
nuclear@0
|
184 #define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT 200 // DSP MUSIC unit - done third
|
nuclear@0
|
185 #define FSOUND_DSP_DEFAULTPRIORITY_USER 300 // User priority, use this as reference
|
nuclear@0
|
186 #define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT 1000 // DSP CLIP AND COPY unit - last
|
nuclear@0
|
187 // [DEFINE_END]
|
nuclear@0
|
188
|
nuclear@0
|
189
|
nuclear@0
|
190 /*
|
nuclear@0
|
191 [DEFINE_START]
|
nuclear@0
|
192 [
|
nuclear@0
|
193 [NAME]
|
nuclear@0
|
194 FSOUND_CAPS
|
nuclear@0
|
195
|
nuclear@0
|
196 [DESCRIPTION]
|
nuclear@0
|
197 Driver description bitfields. Use FSOUND_Driver_GetCaps to determine if a driver enumerated
|
nuclear@0
|
198 has the settings you are after. The enumerated driver depends on the output mode, see
|
nuclear@0
|
199 FSOUND_OUTPUTTYPES
|
nuclear@0
|
200
|
nuclear@0
|
201 [SEE_ALSO]
|
nuclear@0
|
202 FSOUND_GetDriverCaps
|
nuclear@0
|
203 FSOUND_OUTPUTTYPES
|
nuclear@0
|
204 ]
|
nuclear@0
|
205 */
|
nuclear@0
|
206 #define FSOUND_CAPS_HARDWARE 0x1 // This driver supports hardware accelerated 3d sound.
|
nuclear@0
|
207 #define FSOUND_CAPS_EAX 0x2 // This driver supports EAX reverb
|
nuclear@0
|
208 #define FSOUND_CAPS_GEOMETRY_OCCLUSIONS 0x4 // This driver supports (A3D) geometry occlusions
|
nuclear@0
|
209 #define FSOUND_CAPS_GEOMETRY_REFLECTIONS 0x8 // This driver supports (A3D) geometry reflections
|
nuclear@0
|
210 #define FSOUND_CAPS_EAX2 0x10 // This driver supports EAX2/A3D3 reverb
|
nuclear@0
|
211 // [DEFINE_END]
|
nuclear@0
|
212
|
nuclear@0
|
213
|
nuclear@0
|
214 /*
|
nuclear@0
|
215 [DEFINE_START]
|
nuclear@0
|
216 [
|
nuclear@0
|
217 [NAME]
|
nuclear@0
|
218 FSOUND_MODES
|
nuclear@0
|
219
|
nuclear@0
|
220 [DESCRIPTION]
|
nuclear@0
|
221 Sample description bitfields, OR them together for loading and describing samples.
|
nuclear@0
|
222 ]
|
nuclear@0
|
223 */
|
nuclear@0
|
224 #define FSOUND_LOOP_OFF 0x00000001 // For non looping samples.
|
nuclear@0
|
225 #define FSOUND_LOOP_NORMAL 0x00000002 // For forward looping samples.
|
nuclear@0
|
226 #define FSOUND_LOOP_BIDI 0x00000004 // For bidirectional looping samples. (no effect if in hardware).
|
nuclear@0
|
227 #define FSOUND_8BITS 0x00000008 // For 8 bit samples.
|
nuclear@0
|
228 #define FSOUND_16BITS 0x00000010 // For 16 bit samples.
|
nuclear@0
|
229 #define FSOUND_MONO 0x00000020 // For mono samples.
|
nuclear@0
|
230 #define FSOUND_STEREO 0x00000040 // For stereo samples.
|
nuclear@0
|
231 #define FSOUND_UNSIGNED 0x00000080 // For source data containing unsigned samples.
|
nuclear@0
|
232 #define FSOUND_SIGNED 0x00000100 // For source data containing signed data.
|
nuclear@0
|
233 #define FSOUND_DELTA 0x00000200 // For source data stored as delta values.
|
nuclear@0
|
234 #define FSOUND_IT214 0x00000400 // For source data stored using IT214 compression.
|
nuclear@0
|
235 #define FSOUND_IT215 0x00000800 // For source data stored using IT215 compression.
|
nuclear@0
|
236 #define FSOUND_HW3D 0x00001000 // Attempts to make samples use 3d hardware acceleration. (if the card supports it)
|
nuclear@0
|
237 #define FSOUND_2D 0x00002000 // Ignores any 3d processing. overrides FSOUND_HW3D. Located in software.
|
nuclear@0
|
238 #define FSOUND_STREAMABLE 0x00004000 // For a streamable sound where you feed the data to it. If you dont supply this sound may come out corrupted. (only affects a3d output)
|
nuclear@0
|
239 #define FSOUND_LOADMEMORY 0x00008000 // 'name' will be interpreted as a pointer to data for streaming and samples.
|
nuclear@0
|
240 #define FSOUND_LOADRAW 0x00010000 // For will ignore file format and treat as raw pcm.
|
nuclear@0
|
241 #define FSOUND_MPEGACCURATE 0x00020000 // For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. WARNING, see FSOUNDStream_OpenFile for inital opening time performance issues.
|
nuclear@0
|
242
|
nuclear@0
|
243 // Default sample type. Loop off, 8bit mono, signed, not hardware accelerated.
|
nuclear@0
|
244 // Some API functions ignore 8bits and mono, as it may be an mpeg/wav/etc which has its format predetermined.
|
nuclear@0
|
245 #define FSOUND_NORMAL (FSOUND_LOOP_OFF | FSOUND_8BITS | FSOUND_MONO)
|
nuclear@0
|
246 // [DEFINE_END]
|
nuclear@0
|
247
|
nuclear@0
|
248
|
nuclear@0
|
249 /*
|
nuclear@0
|
250 [DEFINE_START]
|
nuclear@0
|
251 [
|
nuclear@0
|
252 [NAME]
|
nuclear@0
|
253 FSOUND_CDPLAYMODES
|
nuclear@0
|
254
|
nuclear@0
|
255 [DESCRIPTION]
|
nuclear@0
|
256 Playback method for a CD Audio track, using FSOUND_CD_Play
|
nuclear@0
|
257
|
nuclear@0
|
258 [SEE_ALSO]
|
nuclear@0
|
259 FSOUND_CD_Play
|
nuclear@0
|
260 ]
|
nuclear@0
|
261 */
|
nuclear@0
|
262 #define FSOUND_CD_PLAYCONTINUOUS 0 // Starts from the current track and plays to end of CD.
|
nuclear@0
|
263 #define FSOUND_CD_PLAYONCE 1 // Plays the specified track then stops.
|
nuclear@0
|
264 #define FSOUND_CD_PLAYLOOPED 2 // Plays the specified track looped, forever until stopped manually.
|
nuclear@0
|
265 #define FSOUND_CD_PLAYRANDOM 3 // Plays tracks in random order
|
nuclear@0
|
266 // [DEFINE_END]
|
nuclear@0
|
267
|
nuclear@0
|
268
|
nuclear@0
|
269 /*
|
nuclear@0
|
270 [DEFINE_START]
|
nuclear@0
|
271 [
|
nuclear@0
|
272 [NAME]
|
nuclear@0
|
273 FSOUND_CHANNELSAMPLEMODE
|
nuclear@0
|
274
|
nuclear@0
|
275 [DESCRIPTION]
|
nuclear@0
|
276 Miscellaneous values for FMOD functions.
|
nuclear@0
|
277
|
nuclear@0
|
278 [SEE_ALSO]
|
nuclear@0
|
279 FSOUND_PlaySound
|
nuclear@0
|
280 FSOUND_PlaySound3DAttrib
|
nuclear@0
|
281
|
nuclear@0
|
282 FSOUND_Sample_Alloc
|
nuclear@0
|
283 FSOUND_Sample_Load
|
nuclear@0
|
284 FSOUND_SetPan
|
nuclear@0
|
285 ]
|
nuclear@0
|
286 */
|
nuclear@0
|
287 #define FSOUND_FREE -1 // value to play on any free channel, or to allocate a sample in a free sample slot.
|
nuclear@0
|
288 #define FSOUND_UNMANAGED -2 // value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot.
|
nuclear@0
|
289 #define FSOUND_ALL -3 // for a channel index , this flag will affect ALL channels available! Not supported by every function.
|
nuclear@0
|
290 #define FSOUND_STEREOPAN -1 // value for FSOUND_SetPan so that stereo sounds are not played at half volume. See FSOUND_SetPan for more on this.
|
nuclear@0
|
291 // [DEFINE_END]
|
nuclear@0
|
292
|
nuclear@0
|
293
|
nuclear@0
|
294 /*
|
nuclear@0
|
295 [ENUM]
|
nuclear@0
|
296 [
|
nuclear@0
|
297 [DESCRIPTION]
|
nuclear@0
|
298 These are environment types defined for use with the FSOUND_Reverb API.
|
nuclear@0
|
299
|
nuclear@0
|
300 [SEE_ALSO]
|
nuclear@0
|
301 FSOUND_Reverb_SetEnvironment
|
nuclear@0
|
302 FSOUND_Reverb_SetEnvironmentAdvanced
|
nuclear@0
|
303 ]
|
nuclear@0
|
304 */
|
nuclear@0
|
305 enum FSOUND_REVERB_ENVIRONMENTS
|
nuclear@0
|
306 {
|
nuclear@0
|
307 FSOUND_ENVIRONMENT_GENERIC,
|
nuclear@0
|
308 FSOUND_ENVIRONMENT_PADDEDCELL,
|
nuclear@0
|
309 FSOUND_ENVIRONMENT_ROOM,
|
nuclear@0
|
310 FSOUND_ENVIRONMENT_BATHROOM,
|
nuclear@0
|
311 FSOUND_ENVIRONMENT_LIVINGROOM,
|
nuclear@0
|
312 FSOUND_ENVIRONMENT_STONEROOM,
|
nuclear@0
|
313 FSOUND_ENVIRONMENT_AUDITORIUM,
|
nuclear@0
|
314 FSOUND_ENVIRONMENT_CONCERTHALL,
|
nuclear@0
|
315 FSOUND_ENVIRONMENT_CAVE,
|
nuclear@0
|
316 FSOUND_ENVIRONMENT_ARENA,
|
nuclear@0
|
317 FSOUND_ENVIRONMENT_HANGAR,
|
nuclear@0
|
318 FSOUND_ENVIRONMENT_CARPETEDHALLWAY,
|
nuclear@0
|
319 FSOUND_ENVIRONMENT_HALLWAY,
|
nuclear@0
|
320 FSOUND_ENVIRONMENT_STONECORRIDOR,
|
nuclear@0
|
321 FSOUND_ENVIRONMENT_ALLEY,
|
nuclear@0
|
322 FSOUND_ENVIRONMENT_FOREST,
|
nuclear@0
|
323 FSOUND_ENVIRONMENT_CITY,
|
nuclear@0
|
324 FSOUND_ENVIRONMENT_MOUNTAINS,
|
nuclear@0
|
325 FSOUND_ENVIRONMENT_QUARRY,
|
nuclear@0
|
326 FSOUND_ENVIRONMENT_PLAIN,
|
nuclear@0
|
327 FSOUND_ENVIRONMENT_PARKINGLOT,
|
nuclear@0
|
328 FSOUND_ENVIRONMENT_SEWERPIPE,
|
nuclear@0
|
329 FSOUND_ENVIRONMENT_UNDERWATER,
|
nuclear@0
|
330 FSOUND_ENVIRONMENT_DRUGGED,
|
nuclear@0
|
331 FSOUND_ENVIRONMENT_DIZZY,
|
nuclear@0
|
332 FSOUND_ENVIRONMENT_PSYCHOTIC,
|
nuclear@0
|
333
|
nuclear@0
|
334 FSOUND_ENVIRONMENT_COUNT
|
nuclear@0
|
335 };
|
nuclear@0
|
336
|
nuclear@0
|
337 /*
|
nuclear@0
|
338 [DEFINE_START]
|
nuclear@0
|
339 [
|
nuclear@0
|
340 [NAME]
|
nuclear@0
|
341 FSOUND_REVERBMIX_USEDISTANCE
|
nuclear@0
|
342
|
nuclear@0
|
343 [DESCRIPTION]
|
nuclear@0
|
344 Used with FSOUND_Reverb_SetMix, this setting allows reverb to attenuate based on distance from the listener.
|
nuclear@0
|
345 Instead of hard coding a value with FSOUND_Reverb_SetMix, this value can be used instead, for a more natural
|
nuclear@0
|
346 reverb dropoff.
|
nuclear@0
|
347
|
nuclear@0
|
348 [SEE_ALSO]
|
nuclear@0
|
349 FSOUND_Reverb_SetMix
|
nuclear@0
|
350 ]
|
nuclear@0
|
351 */
|
nuclear@0
|
352 #define FSOUND_REVERBMIX_USEDISTANCE -1.0f // used with FSOUND_Reverb_SetMix to scale reverb by distance
|
nuclear@0
|
353 // [DEFINE_END]
|
nuclear@0
|
354
|
nuclear@0
|
355
|
nuclear@0
|
356 /*
|
nuclear@0
|
357 [DEFINE_START]
|
nuclear@0
|
358 [
|
nuclear@0
|
359 [NAME]
|
nuclear@0
|
360 FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
361
|
nuclear@0
|
362 [DESCRIPTION]
|
nuclear@0
|
363 Used with FSOUND_Reverb_SetEnvironment and FSOUND_Reverb_SetEnvironmentAdvanced, this can
|
nuclear@0
|
364 be placed in the place of a specific parameter for the reverb setting. It allows you to
|
nuclear@0
|
365 not set any parameters except the ones you are interested in .. and example would be this.
|
nuclear@0
|
366 FSOUND_Reverb_SetEnvironment(FSOUND_REVERB_IGNOREPARAM,
|
nuclear@0
|
367 FSOUND_REVERB_IGNOREPARAM,
|
nuclear@0
|
368 FSOUND_REVERB_IGNOREPARAM,
|
nuclear@0
|
369 0.0f);
|
nuclear@0
|
370 This means env, vol and decay are left alone, but 'damp' is set to 0.
|
nuclear@0
|
371
|
nuclear@0
|
372 [SEE_ALSO]
|
nuclear@0
|
373 FSOUND_Reverb_SetEnvironment
|
nuclear@0
|
374 FSOUND_Reverb_SetEnvironmentAdvanced
|
nuclear@0
|
375 ]
|
nuclear@0
|
376 */
|
nuclear@0
|
377 #define FSOUND_REVERB_IGNOREPARAM -9999999 // used with FSOUND_Reverb_SetEnvironmentAdvanced to ignore certain parameters by choice.
|
nuclear@0
|
378 // [DEFINE_END]
|
nuclear@0
|
379
|
nuclear@0
|
380
|
nuclear@0
|
381 /*
|
nuclear@0
|
382 [DEFINE_START]
|
nuclear@0
|
383 [
|
nuclear@0
|
384 [NAME]
|
nuclear@0
|
385 FSOUND_REVERB_PRESETS
|
nuclear@0
|
386
|
nuclear@0
|
387 [DESCRIPTION]
|
nuclear@0
|
388 A set of predefined environment PARAMETERS, created by Creative Labs
|
nuclear@0
|
389 These can be placed directly into the FSOUND_Reverb_SetEnvironment call
|
nuclear@0
|
390
|
nuclear@0
|
391 [SEE_ALSO]
|
nuclear@0
|
392 FSOUND_Reverb_SetEnvironment
|
nuclear@0
|
393 ]
|
nuclear@0
|
394 */
|
nuclear@0
|
395 #define FSOUND_PRESET_OFF FSOUND_ENVIRONMENT_GENERIC,0.0f,0.0f,0.0f
|
nuclear@0
|
396 #define FSOUND_PRESET_GENERIC FSOUND_ENVIRONMENT_GENERIC,0.5f,1.493f,0.5f
|
nuclear@0
|
397 #define FSOUND_PRESET_PADDEDCELL FSOUND_ENVIRONMENT_PADDEDCELL,0.25f,0.1f,0.0f
|
nuclear@0
|
398 #define FSOUND_PRESET_ROOM FSOUND_ENVIRONMENT_ROOM,0.417f,0.4f,0.666f
|
nuclear@0
|
399 #define FSOUND_PRESET_BATHROOM FSOUND_ENVIRONMENT_BATHROOM,0.653f,1.499f,0.166f
|
nuclear@0
|
400 #define FSOUND_PRESET_LIVINGROOM FSOUND_ENVIRONMENT_LIVINGROOM,0.208f,0.478f,0.0f
|
nuclear@0
|
401 #define FSOUND_PRESET_STONEROOM FSOUND_ENVIRONMENT_STONEROOM,0.5f,2.309f,0.888f
|
nuclear@0
|
402 #define FSOUND_PRESET_AUDITORIUM FSOUND_ENVIRONMENT_AUDITORIUM,0.403f,4.279f,0.5f
|
nuclear@0
|
403 #define FSOUND_PRESET_CONCERTHALL FSOUND_ENVIRONMENT_CONCERTHALL,0.5f,3.961f,0.5f
|
nuclear@0
|
404 #define FSOUND_PRESET_CAVE FSOUND_ENVIRONMENT_CAVE,0.5f,2.886f,1.304f
|
nuclear@0
|
405 #define FSOUND_PRESET_ARENA FSOUND_ENVIRONMENT_ARENA,0.361f,7.284f,0.332f
|
nuclear@0
|
406 #define FSOUND_PRESET_HANGAR FSOUND_ENVIRONMENT_HANGAR,0.5f,10.0f,0.3f
|
nuclear@0
|
407 #define FSOUND_PRESET_CARPETEDHALLWAY FSOUND_ENVIRONMENT_CARPETEDHALLWAY,0.153f,0.259f,2.0f
|
nuclear@0
|
408 #define FSOUND_PRESET_HALLWAY FSOUND_ENVIRONMENT_HALLWAY,0.361f,1.493f,0.0f
|
nuclear@0
|
409 #define FSOUND_PRESET_STONECORRIDOR FSOUND_ENVIRONMENT_STONECORRIDOR,0.444f,2.697f,0.638f
|
nuclear@0
|
410 #define FSOUND_PRESET_ALLEY FSOUND_ENVIRONMENT_ALLEY,0.25f,1.752f,0.776f
|
nuclear@0
|
411 #define FSOUND_PRESET_FOREST FSOUND_ENVIRONMENT_FOREST,0.111f,3.145f,0.472f
|
nuclear@0
|
412 #define FSOUND_PRESET_CITY FSOUND_ENVIRONMENT_CITY,0.111f,2.767f,0.224f
|
nuclear@0
|
413 #define FSOUND_PRESET_MOUNTAINS FSOUND_ENVIRONMENT_MOUNTAINS,0.194f,7.841f,0.472f
|
nuclear@0
|
414 #define FSOUND_PRESET_QUARRY FSOUND_ENVIRONMENT_QUARRY,1.0f,1.499f,0.5f
|
nuclear@0
|
415 #define FSOUND_PRESET_PLAIN FSOUND_ENVIRONMENT_PLAIN,0.097f,2.767f,0.224f
|
nuclear@0
|
416 #define FSOUND_PRESET_PARKINGLOT FSOUND_ENVIRONMENT_PARKINGLOT,0.208f,1.652f,1.5f
|
nuclear@0
|
417 #define FSOUND_PRESET_SEWERPIPE FSOUND_ENVIRONMENT_SEWERPIPE,0.652f,2.886f,0.25f
|
nuclear@0
|
418 #define FSOUND_PRESET_UNDERWATER FSOUND_ENVIRONMENT_UNDERWATER,1.0f,1.499f,0.0f
|
nuclear@0
|
419 #define FSOUND_PRESET_DRUGGED FSOUND_ENVIRONMENT_DRUGGED,0.875f, 8.392f,1.388f
|
nuclear@0
|
420 #define FSOUND_PRESET_DIZZY FSOUND_ENVIRONMENT_DIZZY,0.139f,17.234f,0.666f
|
nuclear@0
|
421 #define FSOUND_PRESET_PSYCHOTIC FSOUND_ENVIRONMENT_PSYCHOTIC,0.486f,7.563f,0.806f
|
nuclear@0
|
422 // [DEFINE_END]
|
nuclear@0
|
423
|
nuclear@0
|
424
|
nuclear@0
|
425 /*
|
nuclear@0
|
426 [DEFINE_START]
|
nuclear@0
|
427 [
|
nuclear@0
|
428 [NAME]
|
nuclear@0
|
429 FSOUND_GEOMETRY_MODES
|
nuclear@0
|
430
|
nuclear@0
|
431 [DESCRIPTION]
|
nuclear@0
|
432 Geometry flags, used as the mode flag in FSOUND_Geometry_AddPolygon
|
nuclear@0
|
433
|
nuclear@0
|
434 [SEE_ALSO]
|
nuclear@0
|
435 FSOUND_Geometry_AddPolygon
|
nuclear@0
|
436 ]
|
nuclear@0
|
437 */
|
nuclear@0
|
438 #define FSOUND_GEOMETRY_NORMAL 0x0 // Default geometry type. Occluding polygon
|
nuclear@0
|
439 #define FSOUND_GEOMETRY_REFLECTIVE 0x01 // This polygon is reflective
|
nuclear@0
|
440 #define FSOUND_GEOMETRY_OPENING 0x02 // Overlays a transparency over the previous polygon. The 'openingfactor' value supplied is copied internally.
|
nuclear@0
|
441 #define FSOUND_GEOMETRY_OPENING_REFERENCE 0x04 // Overlays a transparency over the previous polygon. The 'openingfactor' supplied is pointed to (for access when building a list)
|
nuclear@0
|
442 // [DEFINE_END]
|
nuclear@0
|
443
|
nuclear@0
|
444 /*
|
nuclear@0
|
445 [DEFINE_START]
|
nuclear@0
|
446 [
|
nuclear@0
|
447 [NAME]
|
nuclear@0
|
448 FSOUND_INIT_FLAGS
|
nuclear@0
|
449
|
nuclear@0
|
450 [DESCRIPTION]
|
nuclear@0
|
451 Initialization flags. Use them with FSOUND_Init in the flags parameter to change various behaviour.
|
nuclear@0
|
452
|
nuclear@0
|
453 [SEE_ALSO]
|
nuclear@0
|
454 FSOUND_Init
|
nuclear@0
|
455 ]
|
nuclear@0
|
456 */
|
nuclear@0
|
457 #define FSOUND_INIT_USEDEFAULTMIDISYNTH 0x01 // Causes MIDI playback to force software decoding.
|
nuclear@0
|
458 #define FSOUND_INIT_GLOBALFOCUS 0x02 // For DirectSound output - sound is not muted when window is out of focus.
|
nuclear@0
|
459 // [DEFINE_END]
|
nuclear@0
|
460
|
nuclear@0
|
461
|
nuclear@0
|
462
|
nuclear@0
|
463
|
nuclear@0
|
464 //===============================================================================================
|
nuclear@0
|
465 // FUNCTION PROTOTYPES
|
nuclear@0
|
466 //===============================================================================================
|
nuclear@0
|
467
|
nuclear@0
|
468 #ifdef __cplusplus
|
nuclear@0
|
469 extern "C" {
|
nuclear@0
|
470 #endif
|
nuclear@0
|
471
|
nuclear@0
|
472 // ==================================
|
nuclear@0
|
473 // Initialization / Global functions.
|
nuclear@0
|
474 // ==================================
|
nuclear@0
|
475
|
nuclear@0
|
476 // *Pre* FSOUND_Init functions. These can't be called after FSOUND_Init is
|
nuclear@0
|
477 // called (they will fail). They set up FMOD system functionality.
|
nuclear@0
|
478 DLL_API signed char F_API FSOUND_SetOutput(int outputtype);
|
nuclear@0
|
479 DLL_API signed char F_API FSOUND_SetDriver(int driver);
|
nuclear@0
|
480 DLL_API signed char F_API FSOUND_SetMixer(int mixer);
|
nuclear@0
|
481 DLL_API signed char F_API FSOUND_SetBufferSize(int len_ms);
|
nuclear@0
|
482 DLL_API signed char F_API FSOUND_SetHWND(void *hwnd);
|
nuclear@0
|
483 DLL_API signed char F_API FSOUND_SetMinHardwareChannels(int min);
|
nuclear@0
|
484 DLL_API signed char F_API FSOUND_SetMaxHardwareChannels(int max);
|
nuclear@0
|
485
|
nuclear@0
|
486 // Main initialization / closedown functions.
|
nuclear@0
|
487 // Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override with MIDI playback.
|
nuclear@0
|
488 // : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter which window is in focus.
|
nuclear@0
|
489 DLL_API signed char F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
|
nuclear@0
|
490 DLL_API void F_API FSOUND_Close();
|
nuclear@0
|
491
|
nuclear@0
|
492 // Runtime
|
nuclear@0
|
493 DLL_API void F_API FSOUND_SetSFXMasterVolume(int volume);
|
nuclear@0
|
494 DLL_API void F_API FSOUND_SetPanSeperation(float pansep);
|
nuclear@0
|
495
|
nuclear@0
|
496 // System information.
|
nuclear@0
|
497 DLL_API int F_API FSOUND_GetError();
|
nuclear@0
|
498 DLL_API float F_API FSOUND_GetVersion();
|
nuclear@0
|
499 DLL_API int F_API FSOUND_GetOutput();
|
nuclear@0
|
500 DLL_API int F_API FSOUND_GetDriver();
|
nuclear@0
|
501 DLL_API int F_API FSOUND_GetMixer();
|
nuclear@0
|
502 DLL_API int F_API FSOUND_GetNumDrivers();
|
nuclear@0
|
503 DLL_API signed char * F_API FSOUND_GetDriverName(int id);
|
nuclear@0
|
504 DLL_API signed char F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
|
nuclear@0
|
505 DLL_API int F_API FSOUND_GetOutputRate();
|
nuclear@0
|
506 DLL_API int F_API FSOUND_GetMaxChannels();
|
nuclear@0
|
507 DLL_API int F_API FSOUND_GetMaxSamples();
|
nuclear@0
|
508 DLL_API int F_API FSOUND_GetSFXMasterVolume();
|
nuclear@0
|
509 DLL_API int F_API FSOUND_GetNumHardwareChannels();
|
nuclear@0
|
510 DLL_API int F_API FSOUND_GetChannelsPlaying();
|
nuclear@0
|
511 DLL_API float F_API FSOUND_GetCPUUsage();
|
nuclear@0
|
512
|
nuclear@0
|
513 // ===================================
|
nuclear@0
|
514 // Sample management / load functions.
|
nuclear@0
|
515 // ===================================
|
nuclear@0
|
516
|
nuclear@0
|
517 // Note : Use FSOUND_LOADMEMORY flag with FSOUND_Sample_Load to load from memory.
|
nuclear@0
|
518 // Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data.
|
nuclear@0
|
519
|
nuclear@0
|
520 // Sample creation and management functions
|
nuclear@0
|
521 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name, unsigned int mode, int memlength);
|
nuclear@0
|
522 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
|
nuclear@0
|
523 DLL_API void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
|
nuclear@0
|
524 DLL_API signed char F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
|
nuclear@0
|
525 DLL_API signed char F_API FSOUND_Sample_Lock(FSOUND_SAMPLE *sptr, int offset, int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
|
nuclear@0
|
526 DLL_API signed char F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
|
nuclear@0
|
527
|
nuclear@0
|
528 // Sample control functions
|
nuclear@0
|
529 DLL_API signed char F_API FSOUND_Sample_SetLoopMode(FSOUND_SAMPLE *sptr, unsigned int loopmode);
|
nuclear@0
|
530 DLL_API signed char F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend);
|
nuclear@0
|
531 DLL_API signed char F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri);
|
nuclear@0
|
532 DLL_API signed char F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max);
|
nuclear@0
|
533
|
nuclear@0
|
534 // Sample information
|
nuclear@0
|
535 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
|
nuclear@0
|
536 DLL_API char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
|
nuclear@0
|
537 DLL_API unsigned int F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
|
nuclear@0
|
538 DLL_API signed char F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
|
nuclear@0
|
539 DLL_API signed char F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
|
nuclear@0
|
540 DLL_API unsigned int F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr);
|
nuclear@0
|
541
|
nuclear@0
|
542 // ============================
|
nuclear@0
|
543 // Channel control functions.
|
nuclear@0
|
544 // ============================
|
nuclear@0
|
545
|
nuclear@0
|
546 // Playing and stopping sounds.
|
nuclear@0
|
547 DLL_API int F_API FSOUND_PlaySound(int channel, FSOUND_SAMPLE *sptr);
|
nuclear@0
|
548 DLL_API int F_API FSOUND_PlaySound3DAttrib(int channel, FSOUND_SAMPLE *sptr, int freq, int vol, int pan, float *pos, float *vel);
|
nuclear@0
|
549 DLL_API signed char F_API FSOUND_StopSound(int channel);
|
nuclear@0
|
550
|
nuclear@0
|
551 // Functions to control playback of a channel.
|
nuclear@0
|
552 DLL_API signed char F_API FSOUND_SetFrequency(int channel, int freq);
|
nuclear@0
|
553 DLL_API signed char F_API FSOUND_SetVolume(int channel, int vol);
|
nuclear@0
|
554 DLL_API signed char F_API FSOUND_SetVolumeAbsolute(int channel, int vol);
|
nuclear@0
|
555 DLL_API signed char F_API FSOUND_SetPan(int channel, int pan);
|
nuclear@0
|
556 DLL_API signed char F_API FSOUND_SetSurround(int channel, signed char surround);
|
nuclear@0
|
557 DLL_API signed char F_API FSOUND_SetMute(int channel, signed char mute);
|
nuclear@0
|
558 DLL_API signed char F_API FSOUND_SetPriority(int channel, int priority);
|
nuclear@0
|
559 DLL_API signed char F_API FSOUND_SetReserved(int channel, signed char reserved);
|
nuclear@0
|
560 DLL_API signed char F_API FSOUND_SetPaused(int channel, signed char paused);
|
nuclear@0
|
561 DLL_API signed char F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode);
|
nuclear@0
|
562
|
nuclear@0
|
563 // Channel information
|
nuclear@0
|
564 DLL_API signed char F_API FSOUND_IsPlaying(int channel);
|
nuclear@0
|
565 DLL_API int F_API FSOUND_GetFrequency(int channel);
|
nuclear@0
|
566 DLL_API int F_API FSOUND_GetVolume(int channel);
|
nuclear@0
|
567 DLL_API int F_API FSOUND_GetPan(int channel);
|
nuclear@0
|
568 DLL_API signed char F_API FSOUND_GetSurround(int channel);
|
nuclear@0
|
569 DLL_API signed char F_API FSOUND_GetMute(int channel);
|
nuclear@0
|
570 DLL_API int F_API FSOUND_GetPriority(int channel);
|
nuclear@0
|
571 DLL_API signed char F_API FSOUND_GetReserved(int channel);
|
nuclear@0
|
572 DLL_API signed char F_API FSOUND_GetPaused(int channel);
|
nuclear@0
|
573 DLL_API unsigned int F_API FSOUND_GetCurrentPosition(int channel);
|
nuclear@0
|
574 DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel);
|
nuclear@0
|
575 DLL_API float F_API FSOUND_GetCurrentVU(int channel);
|
nuclear@0
|
576
|
nuclear@0
|
577 // ===================
|
nuclear@0
|
578 // 3D sound functions.
|
nuclear@0
|
579 // ===================
|
nuclear@0
|
580 // see also FSOUND_PlaySound3DAttrib (above)
|
nuclear@0
|
581 // see also FSOUND_Sample_SetMinMaxDistance (above)
|
nuclear@0
|
582 DLL_API void F_API FSOUND_3D_Update();
|
nuclear@0
|
583 DLL_API signed char F_API FSOUND_3D_SetAttributes(int channel, float *pos, float *vel);
|
nuclear@0
|
584 DLL_API signed char F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel);
|
nuclear@0
|
585 DLL_API void F_API FSOUND_3D_Listener_SetAttributes(float *pos, float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
|
nuclear@0
|
586 DLL_API void F_API FSOUND_3D_Listener_GetAttributes(float *pos, float *vel, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz);
|
nuclear@0
|
587 DLL_API void F_API FSOUND_3D_Listener_SetDopplerFactor(float scale);
|
nuclear@0
|
588 DLL_API void F_API FSOUND_3D_Listener_SetDistanceFactor(float scale);
|
nuclear@0
|
589 DLL_API void F_API FSOUND_3D_Listener_SetRolloffFactor(float scale);
|
nuclear@0
|
590
|
nuclear@0
|
591 // =========================
|
nuclear@0
|
592 // File Streaming functions.
|
nuclear@0
|
593 // =========================
|
nuclear@0
|
594
|
nuclear@0
|
595 // Note : Use FSOUND_LOADMEMORY flag with FSOUND_Stream_OpenFile to stream from memory.
|
nuclear@0
|
596 // Use FSOUND_LOADRAW flag with FSOUND_Stream_OpenFile to treat stream as raw pcm data.
|
nuclear@0
|
597 // Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_OpenFile to open mpegs in 'accurate mode' for seeking etc.
|
nuclear@0
|
598
|
nuclear@0
|
599 DLL_API FSOUND_STREAM * F_API FSOUND_Stream_OpenFile(const char *filename, unsigned int mode, int memlength);
|
nuclear@0
|
600 DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata);
|
nuclear@0
|
601 DLL_API int F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream);
|
nuclear@0
|
602 DLL_API int F_API FSOUND_Stream_Play3DAttrib(int channel, FSOUND_STREAM *stream, int freq, int vol, int pan, float *pos, float *vel);
|
nuclear@0
|
603 DLL_API signed char F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream);
|
nuclear@0
|
604 DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
|
nuclear@0
|
605 DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
|
nuclear@0
|
606 DLL_API signed char F_API FSOUND_Stream_SetSynchCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
|
nuclear@0
|
607 DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream);
|
nuclear@0
|
608 DLL_API FSOUND_DSPUNIT *F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param);
|
nuclear@0
|
609
|
nuclear@0
|
610 DLL_API signed char F_API FSOUND_Stream_SetPaused(FSOUND_STREAM *stream, signed char paused);
|
nuclear@0
|
611 DLL_API signed char F_API FSOUND_Stream_GetPaused(FSOUND_STREAM *stream);
|
nuclear@0
|
612 DLL_API signed char F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, int position);
|
nuclear@0
|
613 DLL_API int F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream);
|
nuclear@0
|
614 DLL_API signed char F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms);
|
nuclear@0
|
615 DLL_API int F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream);
|
nuclear@0
|
616 DLL_API int F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream);
|
nuclear@0
|
617 DLL_API int F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream);
|
nuclear@0
|
618
|
nuclear@0
|
619 // ===================
|
nuclear@0
|
620 // CD audio functions.
|
nuclear@0
|
621 // ===================
|
nuclear@0
|
622
|
nuclear@0
|
623 DLL_API signed char F_API FSOUND_CD_Play(int track);
|
nuclear@0
|
624 DLL_API void F_API FSOUND_CD_SetPlayMode(signed char mode);
|
nuclear@0
|
625 DLL_API signed char F_API FSOUND_CD_Stop();
|
nuclear@0
|
626 DLL_API signed char F_API FSOUND_CD_SetPaused(signed char paused);
|
nuclear@0
|
627 DLL_API signed char F_API FSOUND_CD_SetVolume(int volume);
|
nuclear@0
|
628 DLL_API signed char F_API FSOUND_CD_Eject();
|
nuclear@0
|
629
|
nuclear@0
|
630 DLL_API signed char F_API FSOUND_CD_GetPaused();
|
nuclear@0
|
631 DLL_API int F_API FSOUND_CD_GetTrack();
|
nuclear@0
|
632 DLL_API int F_API FSOUND_CD_GetNumTracks();
|
nuclear@0
|
633 DLL_API int F_API FSOUND_CD_GetVolume();
|
nuclear@0
|
634 DLL_API int F_API FSOUND_CD_GetTrackLength(int track);
|
nuclear@0
|
635 DLL_API int F_API FSOUND_CD_GetTrackTime();
|
nuclear@0
|
636
|
nuclear@0
|
637
|
nuclear@0
|
638 // ==============
|
nuclear@0
|
639 // DSP functions.
|
nuclear@0
|
640 // ==============
|
nuclear@0
|
641
|
nuclear@0
|
642 // DSP Unit control and information functions.
|
nuclear@0
|
643 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, int param);
|
nuclear@0
|
644 DLL_API void F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit);
|
nuclear@0
|
645 DLL_API void F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority);
|
nuclear@0
|
646 DLL_API int F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit);
|
nuclear@0
|
647 DLL_API void F_API FSOUND_DSP_SetActive(FSOUND_DSPUNIT *unit, signed char active);
|
nuclear@0
|
648 DLL_API signed char F_API FSOUND_DSP_GetActive(FSOUND_DSPUNIT *unit);
|
nuclear@0
|
649
|
nuclear@0
|
650 // Functions to get hold of FSOUND 'system DSP unit' handles.
|
nuclear@0
|
651 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClearUnit();
|
nuclear@0
|
652 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetSFXUnit();
|
nuclear@0
|
653 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetMusicUnit();
|
nuclear@0
|
654 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClipAndCopyUnit();
|
nuclear@0
|
655
|
nuclear@0
|
656 // misc DSP functions
|
nuclear@0
|
657 DLL_API signed char F_API FSOUND_DSP_MixBuffers(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode);
|
nuclear@0
|
658 DLL_API void F_API FSOUND_DSP_ClearMixBuffer();
|
nuclear@0
|
659 DLL_API int F_API FSOUND_DSP_GetBufferLength();
|
nuclear@0
|
660
|
nuclear@0
|
661 // =============================================
|
nuclear@0
|
662 // Geometry functions. (NOT SUPPORTED IN LINUX)
|
nuclear@0
|
663 // =============================================
|
nuclear@0
|
664
|
nuclear@0
|
665 // scene/polygon functions
|
nuclear@0
|
666 DLL_API signed char F_API FSOUND_Geometry_AddPolygon(float *p1, float *p2, float *p3, float *p4, float *normal, unsigned int mode, float *openingfactor);
|
nuclear@0
|
667 DLL_API int F_API FSOUND_Geometry_AddList(FSOUND_GEOMLIST *geomlist);
|
nuclear@0
|
668
|
nuclear@0
|
669 // polygon list functions
|
nuclear@0
|
670 DLL_API FSOUND_GEOMLIST * F_API FSOUND_Geometry_List_Create(signed char boundingvolume);
|
nuclear@0
|
671 DLL_API signed char F_API FSOUND_Geometry_List_Free(FSOUND_GEOMLIST *geomlist);
|
nuclear@0
|
672 DLL_API signed char F_API FSOUND_Geometry_List_Begin(FSOUND_GEOMLIST *geomlist);
|
nuclear@0
|
673 DLL_API signed char F_API FSOUND_Geometry_List_End(FSOUND_GEOMLIST *geomlist);
|
nuclear@0
|
674
|
nuclear@0
|
675 // material functions
|
nuclear@0
|
676 DLL_API FSOUND_MATERIAL * F_API FSOUND_Geometry_Material_Create();
|
nuclear@0
|
677 DLL_API signed char F_API FSOUND_Geometry_Material_Free(FSOUND_MATERIAL *material);
|
nuclear@0
|
678 DLL_API signed char F_API FSOUND_Geometry_Material_SetAttributes(FSOUND_MATERIAL *material, float reflectancegain, float reflectancefreq, float transmittancegain, float transmittancefreq);
|
nuclear@0
|
679 DLL_API signed char F_API FSOUND_Geometry_Material_GetAttributes(FSOUND_MATERIAL *material, float *reflectancegain, float *reflectancefreq, float *transmittancegain, float *transmittancefreq);
|
nuclear@0
|
680 DLL_API signed char F_API FSOUND_Geometry_Material_Set(FSOUND_MATERIAL *material);
|
nuclear@0
|
681
|
nuclear@0
|
682 // ========================================================================
|
nuclear@0
|
683 // Reverb functions. (eax, eax2, a3d 3.0 reverb) (NOT SUPPORTED IN LINUX)
|
nuclear@0
|
684 // ========================================================================
|
nuclear@0
|
685
|
nuclear@0
|
686 // eax1, eax2, a3d 3.0 (use FSOUND_REVERB_PRESETS if you like), (eax2 support through emulation/parameter conversion)
|
nuclear@0
|
687 DLL_API signed char F_API FSOUND_Reverb_SetEnvironment(int env, float vol, float decay, float damp);
|
nuclear@0
|
688 // eax2, a3d 3.0 only, does not work on eax1
|
nuclear@0
|
689 DLL_API signed char F_API FSOUND_Reverb_SetEnvironmentAdvanced(
|
nuclear@0
|
690 int env,
|
nuclear@0
|
691 int Room, // [-10000, 0] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
692 int RoomHF, // [-10000, 0] default: 0 mB or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
693 float RoomRolloffFactor, // [0.0, 10.0] default: 0.0 or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
694 float DecayTime, // [0.1, 20.0] default: 1.0 s or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
695 float DecayHFRatio, // [0.1, 2.0] default: 0.5 or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
696 int Reflections, // [-10000, 1000] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
697 float ReflectionsDelay, // [0.0, 0.3] default: 0.02 s or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
698 int Reverb, // [-10000, 2000] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
699 float ReverbDelay, // [0.0, 0.1] default: 0.04 s or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
700 float EnvironmentSize, // [0.0, 100.0] default: 100.0 % or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
701 float EnvironmentDiffusion, // [0.0, 100.0] default: 100.0 % or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
702 float AirAbsorptionHF); // [20.0, 20000.0] default: 5000.0 Hz or use FSOUND_REVERB_IGNOREPARAM
|
nuclear@0
|
703
|
nuclear@0
|
704 DLL_API signed char F_API FSOUND_Reverb_SetMix(int channel, float mix);
|
nuclear@0
|
705
|
nuclear@0
|
706 // information functions
|
nuclear@0
|
707 DLL_API signed char F_API FSOUND_Reverb_GetEnvironment(int *env, float *vol, float *decay, float *damp);
|
nuclear@0
|
708 DLL_API signed char F_API FSOUND_Reverb_GetEnvironmentAdvanced(
|
nuclear@0
|
709 int *env,
|
nuclear@0
|
710 int *Room,
|
nuclear@0
|
711 int *RoomHF,
|
nuclear@0
|
712 float *RoomRolloffFactor,
|
nuclear@0
|
713 float *DecayTime,
|
nuclear@0
|
714 float *DecayHFRatio,
|
nuclear@0
|
715 int *Reflections,
|
nuclear@0
|
716 float *ReflectionsDelay,
|
nuclear@0
|
717 int *Reverb,
|
nuclear@0
|
718 float *ReverbDelay,
|
nuclear@0
|
719 float *EnvironmentSize,
|
nuclear@0
|
720 float *EnvironmentDiffusion,
|
nuclear@0
|
721 float *AirAbsorptionHF);
|
nuclear@0
|
722 DLL_API signed char F_API FSOUND_Reverb_GetMix(int channel, float *mix);
|
nuclear@0
|
723
|
nuclear@0
|
724 // =============================================
|
nuclear@0
|
725 // Recording functions (NOT SUPPORTED IN LINUX)
|
nuclear@0
|
726 // =============================================
|
nuclear@0
|
727
|
nuclear@0
|
728 // recording initialization functions
|
nuclear@0
|
729 DLL_API signed char F_API FSOUND_Record_SetDriver(int outputtype);
|
nuclear@0
|
730 DLL_API int F_API FSOUND_Record_GetNumDrivers();
|
nuclear@0
|
731 DLL_API signed char * F_API FSOUND_Record_GetDriverName(int id);
|
nuclear@0
|
732 DLL_API int F_API FSOUND_Record_GetDriver();
|
nuclear@0
|
733
|
nuclear@0
|
734 // recording functionality. Only one recording session will work at a time
|
nuclear@0
|
735 DLL_API signed char F_API FSOUND_Record_StartSample(FSOUND_SAMPLE *sptr, signed char loop);// record to sample
|
nuclear@0
|
736 DLL_API signed char F_API FSOUND_Record_Stop(); // stop recording
|
nuclear@0
|
737 DLL_API int F_API FSOUND_Record_GetPosition(); // offset in sample, or wav file
|
nuclear@0
|
738
|
nuclear@0
|
739 // =========================
|
nuclear@0
|
740 // File system override
|
nuclear@0
|
741 // =========================
|
nuclear@0
|
742
|
nuclear@0
|
743 DLL_API void F_API FSOUND_File_SetCallbacks(unsigned int (_cdecl *OpenCallback)(const char *name),
|
nuclear@0
|
744 void (_cdecl *CloseCallback)(unsigned int handle),
|
nuclear@0
|
745 int (_cdecl *ReadCallback)(void *buffer, int size, unsigned int handle),
|
nuclear@0
|
746 int (_cdecl *SeekCallback)(unsigned int handle, int pos, signed char mode),
|
nuclear@0
|
747 int (_cdecl *TellCallback)(unsigned int handle));
|
nuclear@0
|
748
|
nuclear@0
|
749 // =============================================================================================
|
nuclear@0
|
750 // FMUSIC API
|
nuclear@0
|
751 // =============================================================================================
|
nuclear@0
|
752
|
nuclear@0
|
753 // Song management / playback functions.
|
nuclear@0
|
754 DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
|
nuclear@0
|
755 DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongMemory(void *data, int length);
|
nuclear@0
|
756 DLL_API signed char F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
|
nuclear@0
|
757 DLL_API signed char F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
|
nuclear@0
|
758 DLL_API signed char F_API FMUSIC_StopSong(FMUSIC_MODULE *mod);
|
nuclear@0
|
759 DLL_API void F_API FMUSIC_StopAllSongs();
|
nuclear@0
|
760 DLL_API signed char F_API FMUSIC_SetZxxCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback);
|
nuclear@0
|
761 DLL_API signed char F_API FMUSIC_SetRowCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep);
|
nuclear@0
|
762 DLL_API signed char F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep);
|
nuclear@0
|
763 DLL_API signed char F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument);
|
nuclear@0
|
764 DLL_API signed char F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr);
|
nuclear@0
|
765 DLL_API signed char F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume);
|
nuclear@0
|
766
|
nuclear@0
|
767 // Runtime song functions.
|
nuclear@0
|
768 DLL_API signed char F_API FMUSIC_SetReverb(signed char reverb); // MIDI only.
|
nuclear@0
|
769 DLL_API signed char F_API FMUSIC_SetOrder(FMUSIC_MODULE *mod, int order);
|
nuclear@0
|
770 DLL_API signed char F_API FMUSIC_SetPaused(FMUSIC_MODULE *mod, signed char pause);
|
nuclear@0
|
771 DLL_API signed char F_API FMUSIC_SetMasterVolume(FMUSIC_MODULE *mod, int volume);
|
nuclear@0
|
772 DLL_API signed char F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float pansep);
|
nuclear@0
|
773
|
nuclear@0
|
774 // Static song information functions.
|
nuclear@0
|
775 DLL_API char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
|
nuclear@0
|
776 DLL_API signed char F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
|
nuclear@0
|
777 DLL_API int F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
|
nuclear@0
|
778 DLL_API int F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
|
nuclear@0
|
779 DLL_API int F_API FMUSIC_GetNumInstruments(FMUSIC_MODULE *mod);
|
nuclear@0
|
780 DLL_API int F_API FMUSIC_GetNumSamples(FMUSIC_MODULE *mod);
|
nuclear@0
|
781 DLL_API int F_API FMUSIC_GetNumChannels(FMUSIC_MODULE *mod);
|
nuclear@0
|
782 DLL_API FSOUND_SAMPLE * F_API FMUSIC_GetSample(FMUSIC_MODULE *mod, int sampno);
|
nuclear@0
|
783 DLL_API int F_API FMUSIC_GetPatternLength(FMUSIC_MODULE *mod, int orderno);
|
nuclear@0
|
784
|
nuclear@0
|
785 // Runtime song information.
|
nuclear@0
|
786 DLL_API signed char F_API FMUSIC_IsFinished(FMUSIC_MODULE *mod);
|
nuclear@0
|
787 DLL_API signed char F_API FMUSIC_IsPlaying(FMUSIC_MODULE *mod);
|
nuclear@0
|
788 DLL_API int F_API FMUSIC_GetMasterVolume(FMUSIC_MODULE *mod);
|
nuclear@0
|
789 DLL_API int F_API FMUSIC_GetGlobalVolume(FMUSIC_MODULE *mod);
|
nuclear@0
|
790 DLL_API int F_API FMUSIC_GetOrder(FMUSIC_MODULE *mod);
|
nuclear@0
|
791 DLL_API int F_API FMUSIC_GetPattern(FMUSIC_MODULE *mod);
|
nuclear@0
|
792 DLL_API int F_API FMUSIC_GetSpeed(FMUSIC_MODULE *mod);
|
nuclear@0
|
793 DLL_API int F_API FMUSIC_GetBPM(FMUSIC_MODULE *mod);
|
nuclear@0
|
794 DLL_API int F_API FMUSIC_GetRow(FMUSIC_MODULE *mod);
|
nuclear@0
|
795 DLL_API signed char F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod);
|
nuclear@0
|
796 DLL_API int F_API FMUSIC_GetTime(FMUSIC_MODULE *mod);
|
nuclear@0
|
797
|
nuclear@0
|
798 #ifdef __cplusplus
|
nuclear@0
|
799 }
|
nuclear@0
|
800 #endif
|
nuclear@0
|
801
|
nuclear@0
|
802 #endif
|