source: GTP/trunk/App/Games/Jungle_Rumble/src/fmod.h @ 1378

Revision 1378, 72.9 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1/* ========================================================================================== */
2/* FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.          */
3/* ========================================================================================== */
4
5#ifndef _FMOD_H_
6#define _FMOD_H_
7
8/* ========================================================================================== */
9/* DEFINITIONS                                                                                */
10/* ========================================================================================== */
11
12#if (!defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(_WIN64) && !defined(_WIN32_WCE) && !defined(_XBOX)) || (defined(__GNUC__) && defined(WIN32))
13    #ifndef __cdecl
14        #define __cdecl
15    #endif
16    #ifndef __stdcall
17        #define __stdcall
18    #endif
19#endif
20
21#if defined(_WIN32_WCE)
22    #define F_API _cdecl
23    #define F_CALLBACKAPI _cdecl
24#else
25    #define F_API __stdcall
26    #define F_CALLBACKAPI __stdcall
27#endif
28
29#ifdef DLL_EXPORTS
30    #define DLL_API __declspec(dllexport)
31#else
32    #if defined(__LCC__) || defined(__MINGW32__) || defined(__CYGWIN32__)
33        #define DLL_API F_API
34    #else
35        #define DLL_API
36    #endif /* __LCC__ ||  __MINGW32__ || __CYGWIN32__ */
37#endif /* DLL_EXPORTS */
38
39#define FMOD_VERSION    3.75f
40
41/*
42    FMOD defined types
43*/
44typedef struct FSOUND_SAMPLE    FSOUND_SAMPLE;
45typedef struct FSOUND_STREAM    FSOUND_STREAM;
46typedef struct FSOUND_DSPUNIT   FSOUND_DSPUNIT;
47typedef struct FSOUND_SYNCPOINT FSOUND_SYNCPOINT;
48typedef struct FMUSIC_MODULE    FMUSIC_MODULE;
49
50/*
51    Callback types
52*/
53typedef void *      (F_CALLBACKAPI *FSOUND_OPENCALLBACK)    (const char *name);
54typedef void        (F_CALLBACKAPI *FSOUND_CLOSECALLBACK)   (void *handle);
55typedef int         (F_CALLBACKAPI *FSOUND_READCALLBACK)    (void *buffer, int size, void *handle);
56typedef int         (F_CALLBACKAPI *FSOUND_SEEKCALLBACK)    (void *handle, int pos, signed char mode);
57typedef int         (F_CALLBACKAPI *FSOUND_TELLCALLBACK)    (void *handle);
58
59typedef void *      (F_CALLBACKAPI *FSOUND_ALLOCCALLBACK)   (unsigned int size);
60typedef void *      (F_CALLBACKAPI *FSOUND_REALLOCCALLBACK) (void *ptr, unsigned int size);
61typedef void        (F_CALLBACKAPI *FSOUND_FREECALLBACK)    (void *ptr);
62
63typedef void *      (F_CALLBACKAPI *FSOUND_DSPCALLBACK)     (void *originalbuffer, void *newbuffer, int length, void *userdata);
64typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK)  (FSOUND_STREAM *stream, void *buff, int len, void *userdata);
65typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(char *name, char *value, void *userdata);
66typedef void        (F_CALLBACKAPI *FMUSIC_CALLBACK)        (FMUSIC_MODULE *mod, unsigned char param);
67
68
69/*
70[ENUM]
71[
72    [DESCRIPTION]   
73    On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
74   
75    [SEE_ALSO]     
76    FSOUND_GetError
77]
78*/
79enum FMOD_ERRORS
80{
81    FMOD_ERR_NONE,             /* No errors */
82    FMOD_ERR_BUSY,             /* Cannot call this command after FSOUND_Init.  Call FSOUND_Close first. */
83    FMOD_ERR_UNINITIALIZED,    /* This command failed because FSOUND_Init or FSOUND_SetOutput was not called */
84    FMOD_ERR_INIT,             /* Error initializing output device. */
85    FMOD_ERR_ALLOCATED,        /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
86    FMOD_ERR_PLAY,             /* Playing the sound failed. */
87    FMOD_ERR_OUTPUT_FORMAT,    /* Soundcard does not support the features needed for this soundsystem (16bit stereo output) */
88    FMOD_ERR_COOPERATIVELEVEL, /* Error setting cooperative level for hardware. */
89    FMOD_ERR_CREATEBUFFER,     /* Error creating hardware sound buffer. */
90    FMOD_ERR_FILE_NOTFOUND,    /* File not found */
91    FMOD_ERR_FILE_FORMAT,      /* Unknown file format */
92    FMOD_ERR_FILE_BAD,         /* Error loading file */
93    FMOD_ERR_MEMORY,           /* Not enough memory or resources */
94    FMOD_ERR_VERSION,          /* The version number of this file format is not supported */
95    FMOD_ERR_INVALID_PARAM,    /* An invalid parameter was passed to this function */
96    FMOD_ERR_NO_EAX,           /* Tried to use an EAX command on a non EAX enabled channel or output. */
97    FMOD_ERR_CHANNEL_ALLOC,    /* Failed to allocate a new channel */
98    FMOD_ERR_RECORD,           /* Recording is not supported on this machine */
99    FMOD_ERR_MEDIAPLAYER,      /* Windows Media Player not installed so cannot play wma or use internet streaming. */
100    FMOD_ERR_CDDEVICE          /* An error occured trying to open the specified CD device */
101};
102
103
104/*
105[ENUM]
106[
107    [DESCRIPTION]   
108    These output types are used with FSOUND_SetOutput, to choose which output driver to use.
109   
110    FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
111    does not support DirectX 6 Voice Manager Extensions.
112
113    FSOUND_OUTPUT_WINMM is recommended for NT and CE.
114
115    [SEE_ALSO]     
116    FSOUND_SetOutput
117    FSOUND_GetOutput
118]
119*/
120enum FSOUND_OUTPUTTYPES
121{
122    FSOUND_OUTPUT_NOSOUND,    /* NoSound driver, all calls to this succeed but do nothing. */
123    FSOUND_OUTPUT_WINMM,      /* Windows Multimedia driver. */
124    FSOUND_OUTPUT_DSOUND,     /* DirectSound driver.  You need this to get EAX2 or EAX3 support, or FX api support. */
125    FSOUND_OUTPUT_A3D,        /* A3D driver. */
126
127    FSOUND_OUTPUT_OSS,        /* Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. */
128    FSOUND_OUTPUT_ESD,        /* Linux/Unix ESD (Enlightment Sound Daemon) driver. */
129    FSOUND_OUTPUT_ALSA,       /* Linux Alsa driver. */
130
131    FSOUND_OUTPUT_ASIO,       /* Low latency ASIO driver */
132    FSOUND_OUTPUT_XBOX,       /* Xbox driver */
133    FSOUND_OUTPUT_PS2,        /* PlayStation 2 driver */
134    FSOUND_OUTPUT_MAC,        /* Mac SoundManager driver */
135    FSOUND_OUTPUT_GC,         /* Gamecube driver */
136    FSOUND_OUTPUT_PSP,        /* PlayStation Portable driver */
137
138    FSOUND_OUTPUT_NOSOUND_NONREALTIME   /* This is the same as nosound, but the sound generation is driven by FSOUND_Update */
139};
140
141
142/*
143[ENUM]
144[
145    [DESCRIPTION]   
146    These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
147    upon for other reasons using FSOUND_GetMixer.
148    It is not nescessary to set the mixer.  FMOD will autodetect the best mixer for you.
149
150    [SEE_ALSO]     
151    FSOUND_SetMixer
152    FSOUND_GetMixer
153]
154*/
155enum FSOUND_MIXERTYPES
156{
157    FSOUND_MIXER_AUTODETECT,        /* CE/PS2/GC Only - Non interpolating/low quality mixer. */
158    FSOUND_MIXER_BLENDMODE,         /* Removed / obsolete. */
159    FSOUND_MIXER_MMXP5,             /* Removed / obsolete. */
160    FSOUND_MIXER_MMXP6,             /* Removed / obsolete. */
161
162    FSOUND_MIXER_QUALITY_AUTODETECT,/* All platforms - Autodetect the fastest quality mixer based on your cpu. */
163    FSOUND_MIXER_QUALITY_FPU,       /* Win32/Linux only - Interpolating/volume ramping FPU mixer.  */
164    FSOUND_MIXER_QUALITY_MMXP5,     /* Win32/Linux only - Interpolating/volume ramping P5 MMX mixer.  */
165    FSOUND_MIXER_QUALITY_MMXP6,     /* Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer. */
166
167    FSOUND_MIXER_MONO,              /* CE/PS2/GC only - MONO non interpolating/low quality mixer. For speed*/
168    FSOUND_MIXER_QUALITY_MONO,      /* CE/PS2/GC only - MONO Interpolating mixer.  For speed */
169
170    FSOUND_MIXER_MAX
171};
172
173
174/*
175[ENUM]
176[
177    [DESCRIPTION]   
178    These definitions describe the type of song being played.
179
180    [SEE_ALSO]     
181    FMUSIC_GetType 
182]
183*/
184enum FMUSIC_TYPES
185{
186    FMUSIC_TYPE_NONE,       
187    FMUSIC_TYPE_MOD,        /* Protracker / Fasttracker */
188    FMUSIC_TYPE_S3M,        /* ScreamTracker 3 */
189    FMUSIC_TYPE_XM,         /* FastTracker 2 */
190    FMUSIC_TYPE_IT,         /* Impulse Tracker. */
191    FMUSIC_TYPE_MIDI,       /* MIDI file */
192    FMUSIC_TYPE_FSB         /* FMOD Sample Bank file */
193};
194
195
196/*
197[DEFINE_START]
198[
199    [NAME]
200    FSOUND_DSP_PRIORITIES
201
202    [DESCRIPTION]   
203    These default priorities are used by FMOD internal system DSP units.  They describe the
204    position of the DSP chain, and the order of how audio processing is executed.
205    You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
206    unit), disable or even change the priority of a DSP unit.
207
208    [SEE_ALSO]     
209    FSOUND_DSP_Create
210    FSOUND_DSP_SetPriority
211    FSOUND_DSP_GetSpectrum
212]
213*/
214#define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT        0       /* DSP CLEAR unit - done first */
215#define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT          100     /* DSP SFX unit - done second */
216#define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT        200     /* DSP MUSIC unit - done third */
217#define FSOUND_DSP_DEFAULTPRIORITY_USER             300     /* User priority, use this as reference for your own DSP units */
218#define FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT          900     /* This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units */
219#define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT  1000    /* DSP CLIP AND COPY unit - last */
220/* [DEFINE_END] */
221
222
223/*
224[DEFINE_START]
225[
226    [NAME]
227    FSOUND_CAPS
228
229    [DESCRIPTION]   
230    Driver description bitfields.  Use FSOUND_Driver_GetCaps to determine if a driver enumerated
231    has the settings you are after.  The enumerated driver depends on the output mode, see
232    FSOUND_OUTPUTTYPES
233
234    [SEE_ALSO]
235    FSOUND_GetDriverCaps
236    FSOUND_OUTPUTTYPES
237]
238*/
239#define FSOUND_CAPS_HARDWARE                0x1     /* This driver supports hardware accelerated 3d sound. */
240#define FSOUND_CAPS_EAX2                    0x2     /* This driver supports EAX 2 reverb */
241#define FSOUND_CAPS_EAX3                    0x10    /* This driver supports EAX 3 reverb */
242/* [DEFINE_END] */
243
244
245/*
246[DEFINE_START]
247[
248    [NAME]
249    FSOUND_MODES
250   
251    [DESCRIPTION]   
252    Sample description bitfields, OR them together for loading and describing samples.
253    NOTE.  If the file format being loaded already has a defined format, such as WAV or MP3, then
254    trying to override the pre-defined format with a new set of format flags will not work.  For
255    example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS.  It will just
256    ignore the flag and go ahead loading it as 8bits.  For these type of formats the only flags
257    you can specify that will really alter the behaviour of how it is loaded, are the following.
258    ---------
259    Looping behaviour - FSOUND_LOOP_OFF, FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI
260    Load destination - FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D
261    Loading behaviour - FSOUND_NONBLOCKING, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_MPEGHALFRATE, FSOUND_FORCEMONO
262    Playback behaviour - FSOUND_STREAMABLE, FSOUND_ENABLEFX
263    PlayStation 2 only - FSOUND_USECORE0, FSOUND_USECORE1, FSOUND_LOADMEMORYIOP   
264    ---------
265    See flag descriptions for what these do.
266]
267*/
268#define FSOUND_LOOP_OFF      0x00000001  /* For non looping samples. */
269#define FSOUND_LOOP_NORMAL   0x00000002  /* For forward looping samples. */
270#define FSOUND_LOOP_BIDI     0x00000004  /* For bidirectional looping samples.  (no effect if in hardware). */
271#define FSOUND_8BITS         0x00000008  /* For 8 bit samples. */
272#define FSOUND_16BITS        0x00000010  /* For 16 bit samples. */
273#define FSOUND_MONO          0x00000020  /* For mono samples. */
274#define FSOUND_STEREO        0x00000040  /* For stereo samples. */
275#define FSOUND_UNSIGNED      0x00000080  /* For user created source data containing unsigned samples. */
276#define FSOUND_SIGNED        0x00000100  /* For user created source data containing signed data. */
277#define FSOUND_DELTA         0x00000200  /* For user created source data stored as delta values. */
278#define FSOUND_IT214         0x00000400  /* For user created source data stored using IT214 compression. */
279#define FSOUND_IT215         0x00000800  /* For user created source data stored using IT215 compression. */
280#define FSOUND_HW3D          0x00001000  /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
281#define FSOUND_2D            0x00002000  /* Tells software (not hardware) based sample not to be included in 3d processing. */
282#define FSOUND_STREAMABLE    0x00004000  /* For a streamimg sound where you feed the data to it. */
283#define FSOUND_LOADMEMORY    0x00008000  /* "name" will be interpreted as a pointer to data for streaming and samples. */
284#define FSOUND_LOADRAW       0x00010000  /* Will ignore file format and treat as raw pcm. */
285#define FSOUND_MPEGACCURATE  0x00020000  /* For FSOUND_Stream_Open - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime.  WARNING, see FSOUND_Stream_Open for inital opening time performance issues. */
286#define FSOUND_FORCEMONO     0x00040000  /* For forcing stereo streams and samples to be mono - needed if using FSOUND_HW3D and stereo data - incurs a small speed hit for streams */
287#define FSOUND_HW2D          0x00080000  /* 2D hardware sounds.  allows hardware specific effects */
288#define FSOUND_ENABLEFX      0x00100000  /* Allows DX8 FX to be played back on a sound.  Requires DirectX 8 - Note these sounds cannot be played more than once, be 8 bit, be less than a certain size, or have a changing frequency */
289#define FSOUND_MPEGHALFRATE  0x00200000  /* For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution */
290#define FSOUND_IMAADPCM      0x00400000  /* Contents are stored compressed as IMA ADPCM */
291#define FSOUND_VAG           0x00800000  /* For PS2 only - Contents are compressed as Sony VAG format */
292#define FSOUND_NONBLOCKING   0x01000000  /* For FSOUND_Stream_Open/FMUSIC_LoadSong - Causes stream or music to open in the background and not block the foreground app.  See FSOUND_Stream_GetOpenState or FMUSIC_GetOpenState to determine when it IS ready. */
293#define FSOUND_GCADPCM       0x02000000  /* For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format */
294#define FSOUND_MULTICHANNEL  0x04000000  /* For PS2 and Gamecube only - Contents are interleaved into a multi-channel (more than stereo) format */
295#define FSOUND_USECORE0      0x08000000  /* For PS2 only - Sample/Stream is forced to use hardware voices 00-23 */
296#define FSOUND_USECORE1      0x10000000  /* For PS2 only - Sample/Stream is forced to use hardware voices 24-47 */
297#define FSOUND_LOADMEMORYIOP 0x20000000  /* For PS2 only - "name" will be interpreted as a pointer to data for streaming and samples.  The address provided will be an IOP address */
298#define FSOUND_IGNORETAGS    0x40000000  /* Skips id3v2 etc tag checks when opening a stream, to reduce seek/read overhead when opening files (helps with CD performance) */
299#define FSOUND_STREAM_NET    0x80000000  /* Specifies an internet stream */
300
301#define FSOUND_NORMAL       (FSOUND_16BITS | FSOUND_SIGNED | FSOUND_MONO)     
302/* [DEFINE_END] */
303
304
305
306/*
307[DEFINE_START]
308[
309    [NAME]
310    FSOUND_CDPLAYMODES
311   
312    [DESCRIPTION]   
313    Playback method for a CD Audio track, with FSOUND_CD_SetPlayMode
314
315    [SEE_ALSO]   
316    FSOUND_CD_SetPlayMode 
317    FSOUND_CD_Play
318]
319*/
320#define FSOUND_CD_PLAYCONTINUOUS    0   /* Starts from the current track and plays to end of CD. */
321#define FSOUND_CD_PLAYONCE          1   /* Plays the specified track then stops. */
322#define FSOUND_CD_PLAYLOOPED        2   /* Plays the specified track looped, forever until stopped manually. */
323#define FSOUND_CD_PLAYRANDOM        3   /* Plays tracks in random order */
324/* [DEFINE_END] */
325
326
327/*
328[DEFINE_START]
329[
330    [NAME]
331    FSOUND_MISC_VALUES
332   
333    [DESCRIPTION]
334    Miscellaneous values for FMOD functions.
335
336    [SEE_ALSO]
337    FSOUND_PlaySound
338    FSOUND_PlaySoundEx
339    FSOUND_Sample_Alloc
340    FSOUND_Sample_Load
341    FSOUND_SetPan
342]
343*/
344#define FSOUND_FREE             -1      /* value to play on any free channel, or to allocate a sample in a free sample slot. */
345#define FSOUND_UNMANAGED        -2      /* value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot. */
346#define FSOUND_ALL              -3      /* for a channel index , this flag will affect ALL channels available!  Not supported by every function. */
347#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. */
348#define FSOUND_SYSTEMCHANNEL    -1000   /* special 'channel' ID for all channel based functions that want to alter the global FSOUND software mixing output channel */
349#define FSOUND_SYSTEMSAMPLE     -1000   /* special 'sample' ID for all sample based functions that want to alter the global FSOUND software mixing output sample */
350
351/* [DEFINE_END] */
352
353
354/*
355[STRUCTURE]
356[
357    [DESCRIPTION]
358    Structure defining a reverb environment.
359    For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3
360    documentation at http://developer.creative.com/ under the 'downloads' section.
361    If they do not have the EAX3 documentation, then most information can be attained from
362    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of EAX2.
363    Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
364    Note that integer values that typically range from -10,000 to 1000 are represented in decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
365    PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). 
366    Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then the reverb should product a similar effect on either platform.
367   
368    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
369
370    [SEE_ALSO]
371    FSOUND_Reverb_SetProperties
372    FSOUND_Reverb_GetProperties
373    FSOUND_REVERB_PRESETS
374    FSOUND_REVERB_FLAGS
375]
376*/
377typedef struct _FSOUND_REVERB_PROPERTIES /* MIN     MAX    DEFAULT   DESCRIPTION */
378{                                   
379    unsigned int Environment;            /* 0     , 25    , 0      , sets all listener properties (WIN32/PS2 only) */
380    float        EnvSize;                /* 1.0   , 100.0 , 7.5    , environment size in meters (WIN32 only) */
381    float        EnvDiffusion;           /* 0.0   , 1.0   , 1.0    , environment diffusion (WIN32/XBOX) */
382    int          Room;                   /* -10000, 0     , -1000  , room effect level (at mid frequencies) (WIN32/XBOX/PS2) */
383    int          RoomHF;                 /* -10000, 0     , -100   , relative room effect level at high frequencies (WIN32/XBOX) */
384    int          RoomLF;                 /* -10000, 0     , 0      , relative room effect level at low frequencies (WIN32 only) */
385    float        DecayTime;              /* 0.1   , 20.0  , 1.49   , reverberation decay time at mid frequencies (WIN32/XBOX) */
386    float        DecayHFRatio;           /* 0.1   , 2.0   , 0.83   , high-frequency to mid-frequency decay time ratio (WIN32/XBOX) */
387    float        DecayLFRatio;           /* 0.1   , 2.0   , 1.0    , low-frequency to mid-frequency decay time ratio (WIN32 only) */
388    int          Reflections;            /* -10000, 1000  , -2602  , early reflections level relative to room effect (WIN32/XBOX) */
389    float        ReflectionsDelay;       /* 0.0   , 0.3   , 0.007  , initial reflection delay time (WIN32/XBOX) */
390    float        ReflectionsPan[3];      /*       ,       , [0,0,0], early reflections panning vector (WIN32 only) */
391    int          Reverb;                 /* -10000, 2000  , 200    , late reverberation level relative to room effect (WIN32/XBOX) */
392    float        ReverbDelay;            /* 0.0   , 0.1   , 0.011  , late reverberation delay time relative to initial reflection (WIN32/XBOX) */
393    float        ReverbPan[3];           /*       ,       , [0,0,0], late reverberation panning vector (WIN32 only) */
394    float        EchoTime;               /* .075  , 0.25  , 0.25   , echo time (WIN32/PS2 only.  PS2 = Delay time for ECHO/DELAY modes only) */
395    float        EchoDepth;              /* 0.0   , 1.0   , 0.0    , echo depth (WIN32/PS2 only.  PS2 = Feedback level for ECHO mode only) */
396    float        ModulationTime;         /* 0.04  , 4.0   , 0.25   , modulation time (WIN32 only) */
397    float        ModulationDepth;        /* 0.0   , 1.0   , 0.0    , modulation depth (WIN32 only) */
398    float        AirAbsorptionHF;        /* -100  , 0.0   , -5.0   , change in level per meter at high frequencies (WIN32 only) */
399    float        HFReference;            /* 1000.0, 20000 , 5000.0 , reference high frequency (hz) (WIN32/XBOX) */
400    float        LFReference;            /* 20.0  , 1000.0, 250.0  , reference low frequency (hz) (WIN32 only) */
401    float        RoomRolloffFactor;      /* 0.0   , 10.0  , 0.0    , like FSOUND_3D_SetRolloffFactor but for room effect (WIN32/XBOX) */
402    float        Diffusion;              /* 0.0   , 100.0 , 100.0  , Value that controls the echo density in the late reverberation decay. (XBOX only) */
403    float        Density;                /* 0.0   , 100.0 , 100.0  , Value that controls the modal density in the late reverberation decay (XBOX only) */
404    unsigned int Flags;                  /* FSOUND_REVERB_FLAGS - modifies the behavior of above properties (WIN32/PS2 only) */
405} FSOUND_REVERB_PROPERTIES;
406
407
408/*
409[DEFINE_START]
410[
411    [NAME]
412    FSOUND_REVERB_FLAGS
413   
414    [DESCRIPTION]
415    Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
416
417    [SEE_ALSO]
418    FSOUND_REVERB_PROPERTIES
419]
420*/
421#define FSOUND_REVERB_FLAGS_DECAYTIMESCALE        0x00000001 /* 'EnvSize' affects reverberation decay time */
422#define FSOUND_REVERB_FLAGS_REFLECTIONSSCALE      0x00000002 /* 'EnvSize' affects reflection level */
423#define FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE 0x00000004 /* 'EnvSize' affects initial reflection delay time */
424#define FSOUND_REVERB_FLAGS_REVERBSCALE           0x00000008 /* 'EnvSize' affects reflections level */
425#define FSOUND_REVERB_FLAGS_REVERBDELAYSCALE      0x00000010 /* 'EnvSize' affects late reverberation delay time */
426#define FSOUND_REVERB_FLAGS_DECAYHFLIMIT          0x00000020 /* AirAbsorptionHF affects DecayHFRatio */
427#define FSOUND_REVERB_FLAGS_ECHOTIMESCALE         0x00000040 /* 'EnvSize' affects echo time */
428#define FSOUND_REVERB_FLAGS_MODULATIONTIMESCALE   0x00000080 /* 'EnvSize' affects modulation time */
429#define FSOUND_REVERB_FLAGS_CORE0                 0x00000100 /* PS2 Only - Reverb is applied to CORE0 (hw voices 0-23) */
430#define FSOUND_REVERB_FLAGS_CORE1                 0x00000200 /* PS2 Only - Reverb is applied to CORE1 (hw voices 24-47) */
431#define FSOUND_REVERB_FLAGS_DEFAULT              (FSOUND_REVERB_FLAGS_DECAYTIMESCALE |        \
432                                                  FSOUND_REVERB_FLAGS_REFLECTIONSSCALE |      \
433                                                  FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE | \
434                                                  FSOUND_REVERB_FLAGS_REVERBSCALE |           \
435                                                  FSOUND_REVERB_FLAGS_REVERBDELAYSCALE |      \
436                                                  FSOUND_REVERB_FLAGS_DECAYHFLIMIT |          \
437                                                  FSOUND_REVERB_FLAGS_CORE0 |                 \
438                                                  FSOUND_REVERB_FLAGS_CORE1 )
439/* [DEFINE_END] */
440
441
442
443
444/*
445[DEFINE_START]
446[
447    [NAME]
448    FSOUND_REVERB_PRESETS
449   
450    [DESCRIPTION]   
451    A set of predefined environment PARAMETERS, created by Creative Labs
452    These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
453    ie
454    FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
455
456    [SEE_ALSO]
457    FSOUND_Reverb_SetProperties
458]
459*/
460/*                                     Env  Size    Diffus  Room   RoomHF  RmLF DecTm   DecHF  DecLF   Refl  RefDel  RefPan               Revb  RevDel  ReverbPan           EchoTm  EchDp  ModTm  ModDp  AirAbs  HFRef    LFRef  RRlOff Diffus  Densty  FLAGS */
461#define FSOUND_PRESET_OFF              {0,      7.5f,   1.00f, -10000, -10000, 0,   1.00f,  1.00f, 1.0f,  -2602, 0.007f, { 0.0f,0.0f,0.0f },   200, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,   0.0f,   0.0f, 0x33f }
462#define FSOUND_PRESET_GENERIC          {0,      7.5f,   1.00f, -1000,  -100,   0,   1.49f,  0.83f, 1.0f,  -2602, 0.007f, { 0.0f,0.0f,0.0f },   200, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
463#define FSOUND_PRESET_PADDEDCELL       {1,      1.4f,   1.00f, -1000,  -6000,  0,   0.17f,  0.10f, 1.0f,  -1204, 0.001f, { 0.0f,0.0f,0.0f },   207, 0.002f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
464#define FSOUND_PRESET_ROOM                 {2,  1.9f,   1.00f, -1000,  -454,   0,   0.40f,  0.83f, 1.0f,  -1646, 0.002f, { 0.0f,0.0f,0.0f },    53, 0.003f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
465#define FSOUND_PRESET_BATHROOM         {3,      1.4f,   1.00f, -1000,  -1200,  0,   1.49f,  0.54f, 1.0f,   -370, 0.007f, { 0.0f,0.0f,0.0f },  1030, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f,  60.0f, 0x3f }
466#define FSOUND_PRESET_LIVINGROOM       {4,      2.5f,   1.00f, -1000,  -6000,  0,   0.50f,  0.10f, 1.0f,  -1376, 0.003f, { 0.0f,0.0f,0.0f }, -1104, 0.004f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
467#define FSOUND_PRESET_STONEROOM        {5,      11.6f,  1.00f, -1000,  -300,   0,   2.31f,  0.64f, 1.0f,   -711, 0.012f, { 0.0f,0.0f,0.0f },    83, 0.017f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
468#define FSOUND_PRESET_AUDITORIUM       {6,      21.6f,  1.00f, -1000,  -476,   0,   4.32f,  0.59f, 1.0f,   -789, 0.020f, { 0.0f,0.0f,0.0f },  -289, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
469#define FSOUND_PRESET_CONCERTHALL      {7,      19.6f,  1.00f, -1000,  -500,   0,   3.92f,  0.70f, 1.0f,  -1230, 0.020f, { 0.0f,0.0f,0.0f },    -2, 0.029f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
470#define FSOUND_PRESET_CAVE             {8,      14.6f,  1.00f, -1000,  0,      0,   2.91f,  1.30f, 1.0f,   -602, 0.015f, { 0.0f,0.0f,0.0f },  -302, 0.022f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
471#define FSOUND_PRESET_ARENA            {9,      36.2f,  1.00f, -1000,  -698,   0,   7.24f,  0.33f, 1.0f,  -1166, 0.020f, { 0.0f,0.0f,0.0f },    16, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
472#define FSOUND_PRESET_HANGAR           {10,     50.3f,  1.00f, -1000,  -1000,  0,   10.05f, 0.23f, 1.0f,   -602, 0.020f, { 0.0f,0.0f,0.0f },   198, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
473#define FSOUND_PRESET_CARPETTEDHALLWAY {11,     1.9f,   1.00f, -1000,  -4000,  0,   0.30f,  0.10f, 1.0f,  -1831, 0.002f, { 0.0f,0.0f,0.0f }, -1630, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
474#define FSOUND_PRESET_HALLWAY          {12,     1.8f,   1.00f, -1000,  -300,   0,   1.49f,  0.59f, 1.0f,  -1219, 0.007f, { 0.0f,0.0f,0.0f },   441, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
475#define FSOUND_PRESET_STONECORRIDOR    {13,     13.5f,  1.00f, -1000,  -237,   0,   2.70f,  0.79f, 1.0f,  -1214, 0.013f, { 0.0f,0.0f,0.0f },   395, 0.020f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
476#define FSOUND_PRESET_ALLEY            {14,     7.5f,   0.30f, -1000,  -270,   0,   1.49f,  0.86f, 1.0f,  -1204, 0.007f, { 0.0f,0.0f,0.0f },    -4, 0.011f, { 0.0f,0.0f,0.0f }, 0.125f, 0.95f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
477#define FSOUND_PRESET_FOREST           {15,     38.0f,  0.30f, -1000,  -3300,  0,   1.49f,  0.54f, 1.0f,  -2560, 0.162f, { 0.0f,0.0f,0.0f },  -229, 0.088f, { 0.0f,0.0f,0.0f }, 0.125f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  79.0f, 100.0f, 0x3f }
478#define FSOUND_PRESET_CITY             {16,     7.5f,   0.50f, -1000,  -800,   0,   1.49f,  0.67f, 1.0f,  -2273, 0.007f, { 0.0f,0.0f,0.0f }, -1691, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  50.0f, 100.0f, 0x3f }
479#define FSOUND_PRESET_MOUNTAINS        {17,     100.0f, 0.27f, -1000,  -2500,  0,   1.49f,  0.21f, 1.0f,  -2780, 0.300f, { 0.0f,0.0f,0.0f }, -1434, 0.100f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  27.0f, 100.0f, 0x1f }
480#define FSOUND_PRESET_QUARRY           {18,     17.5f,  1.00f, -1000,  -1000,  0,   1.49f,  0.83f, 1.0f, -10000, 0.061f, { 0.0f,0.0f,0.0f },   500, 0.025f, { 0.0f,0.0f,0.0f }, 0.125f, 0.70f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
481#define FSOUND_PRESET_PLAIN            {19,     42.5f,  0.21f, -1000,  -2000,  0,   1.49f,  0.50f, 1.0f,  -2466, 0.179f, { 0.0f,0.0f,0.0f }, -1926, 0.100f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  21.0f, 100.0f, 0x3f }
482#define FSOUND_PRESET_PARKINGLOT       {20,     8.3f,   1.00f, -1000,  0,      0,   1.65f,  1.50f, 1.0f,  -1363, 0.008f, { 0.0f,0.0f,0.0f }, -1153, 0.012f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
483#define FSOUND_PRESET_SEWERPIPE        {21,     1.7f,   0.80f, -1000,  -1000,  0,   2.81f,  0.14f, 1.0f,    429, 0.014f, { 0.0f,0.0f,0.0f },  1023, 0.021f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  80.0f,  60.0f, 0x3f }
484#define FSOUND_PRESET_UNDERWATER       {22,     1.8f,   1.00f, -1000,  -4000,  0,   1.49f,  0.10f, 1.0f,   -449, 0.007f, { 0.0f,0.0f,0.0f },  1700, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 1.18f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
485
486/* Non I3DL2 presets */
487
488#define FSOUND_PRESET_DRUGGED          {23,     1.9f,   0.50f, -1000,  0,      0,   8.39f,  1.39f, 1.0f,  -115,  0.002f, { 0.0f,0.0f,0.0f },   985, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
489#define FSOUND_PRESET_DIZZY            {24,     1.8f,   0.60f, -1000,  -400,   0,   17.23f, 0.56f, 1.0f,  -1713, 0.020f, { 0.0f,0.0f,0.0f },  -613, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.81f, 0.310f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
490#define FSOUND_PRESET_PSYCHOTIC        {25,     1.0f,   0.50f, -1000,  -151,   0,   7.56f,  0.91f, 1.0f,  -626,  0.020f, { 0.0f,0.0f,0.0f },   774, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 4.00f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
491
492/* PlayStation 2 and PlayStation Portable only presets */
493
494#define FSOUND_PRESET_PS2_ROOM         {1,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
495#define FSOUND_PRESET_PS2_STUDIO_A     {2,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
496#define FSOUND_PRESET_PS2_STUDIO_B     {3,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
497#define FSOUND_PRESET_PS2_STUDIO_C     {4,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
498#define FSOUND_PRESET_PS2_HALL         {5,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
499#define FSOUND_PRESET_PS2_SPACE        {6,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
500#define FSOUND_PRESET_PS2_ECHO         {7,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
501#define FSOUND_PRESET_PS2_DELAY        {8,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
502#define FSOUND_PRESET_PS2_PIPE         {9,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
503
504/* [DEFINE_END] */
505
506
507/*
508[STRUCTURE]
509[
510    [DESCRIPTION]
511    Structure defining the properties for a reverb source, related to a FSOUND channel.
512    For more indepth descriptions of the reverb properties under win32, please see the EAX3
513    documentation at http://developer.creative.com/ under the 'downloads' section.
514    If they do not have the EAX3 documentation, then most information can be attained from
515    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
516    EAX2.
517   
518    Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
519    Note that integer values that typically range from -10,000 to 1000 are represented in
520    decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
521    PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). 
522    Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
523    the reverb should product a similar effect on either platform.
524    Linux and FMODCE do not support the reverb api.
525   
526    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
527
528    [SEE_ALSO]
529    FSOUND_Reverb_SetChannelProperties
530    FSOUND_Reverb_GetChannelProperties
531    FSOUND_REVERB_CHANNELFLAGS
532]
533*/
534typedef struct _FSOUND_REVERB_CHANNELPROPERTIES /* MIN     MAX    DEFAULT */
535{                                   
536    int    Direct;                              /* -10000, 1000,  0,    direct path level (at low and mid frequencies) (WIN32/XBOX) */
537    int    DirectHF;                            /* -10000, 0,     0,    relative direct path level at high frequencies (WIN32/XBOX) */
538    int    Room;                                /* -10000, 1000,  0,    room effect level (at low and mid frequencies) (WIN32/XBOX/PS2) */
539    int    RoomHF;                              /* -10000, 0,     0,    relative room effect level at high frequencies (WIN32/XBOX) */
540    int    Obstruction;                         /* -10000, 0,     0,    main obstruction control (attenuation at high frequencies)  (WIN32/XBOX) */
541    float  ObstructionLFRatio;                  /* 0.0,    1.0,   0.0,  obstruction low-frequency level re. main control (WIN32/XBOX) */
542    int    Occlusion;                           /* -10000, 0,     0,    main occlusion control (attenuation at high frequencies) (WIN32/XBOX) */
543    float  OcclusionLFRatio;                    /* 0.0,    1.0,   0.25, occlusion low-frequency level re. main control (WIN32/XBOX) */
544    float  OcclusionRoomRatio;                  /* 0.0,    10.0,  1.5,  relative occlusion control for room effect (WIN32) */
545    float  OcclusionDirectRatio;                /* 0.0,    10.0,  1.0,  relative occlusion control for direct path (WIN32) */
546    int    Exclusion;                           /* -10000, 0,     0,    main exlusion control (attenuation at high frequencies) (WIN32) */
547    float  ExclusionLFRatio;                    /* 0.0,    1.0,   1.0,  exclusion low-frequency level re. main control (WIN32) */
548    int    OutsideVolumeHF;                     /* -10000, 0,     0,    outside sound cone level at high frequencies (WIN32) */
549    float  DopplerFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flDopplerFactor but per source (WIN32) */
550    float  RolloffFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but per source (WIN32) */
551    float  RoomRolloffFactor;                   /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but for room effect (WIN32/XBOX) */
552    float  AirAbsorptionFactor;                 /* 0.0,    10.0,  1.0,  multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (WIN32) */
553    int    Flags;                               /* FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (WIN32) */
554} FSOUND_REVERB_CHANNELPROPERTIES;
555
556
557/*
558[DEFINE_START]
559[
560    [NAME]
561    FSOUND_REVERB_CHANNELFLAGS
562   
563    [DESCRIPTION]
564    Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
565
566    [SEE_ALSO]
567    FSOUND_REVERB_CHANNELPROPERTIES
568]
569*/
570#define FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO  0x00000001 /* Automatic setting of 'Direct'  due to distance from listener */
571#define FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO      0x00000002 /* Automatic setting of 'Room'  due to distance from listener */
572#define FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO    0x00000004 /* Automatic setting of 'RoomHF' due to distance from listener */
573#define FSOUND_REVERB_CHANNELFLAGS_DEFAULT       (FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO |   \
574                                                  FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO|        \
575                                                  FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO)
576/* [DEFINE_END] */
577
578
579/*
580[ENUM]
581[
582    [DESCRIPTION]
583    These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
584
585    [SEE_ALSO]
586    FSOUND_FX_Enable
587    FSOUND_FX_Disable
588    FSOUND_FX_SetChorus
589    FSOUND_FX_SetCompressor
590    FSOUND_FX_SetDistortion
591    FSOUND_FX_SetEcho
592    FSOUND_FX_SetFlanger
593    FSOUND_FX_SetGargle
594    FSOUND_FX_SetI3DL2Reverb
595    FSOUND_FX_SetParamEQ
596    FSOUND_FX_SetWavesReverb
597]
598*/
599enum FSOUND_FX_MODES
600{
601    FSOUND_FX_CHORUS,
602    FSOUND_FX_COMPRESSOR,
603    FSOUND_FX_DISTORTION,
604    FSOUND_FX_ECHO,
605    FSOUND_FX_FLANGER,
606    FSOUND_FX_GARGLE,
607    FSOUND_FX_I3DL2REVERB,
608    FSOUND_FX_PARAMEQ,
609    FSOUND_FX_WAVES_REVERB,
610
611    FSOUND_FX_MAX
612};
613
614/*
615[ENUM]
616[
617    [DESCRIPTION]   
618    These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
619    Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes.  Other output modes will only
620    interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
621
622    Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
623
624    [SEE_ALSO]
625    FSOUND_SetSpeakerMode
626
627]
628*/
629enum FSOUND_SPEAKERMODES
630{
631    FSOUND_SPEAKERMODE_DOLBYDIGITAL,        /* Dolby Digital Output (XBOX or PC only). */
632    FSOUND_SPEAKERMODE_HEADPHONES,          /* The speakers are headphones. */
633    FSOUND_SPEAKERMODE_MONO,                /* The speakers are monaural. */
634    FSOUND_SPEAKERMODE_QUAD,                /* The speakers are quadraphonic.  */
635    FSOUND_SPEAKERMODE_STEREO,              /* The speakers are stereo (default value). */
636    FSOUND_SPEAKERMODE_SURROUND,            /* The speakers are surround sound. */
637    FSOUND_SPEAKERMODE_DTS,                 /* DTS output (XBOX only). */
638    FSOUND_SPEAKERMODE_PROLOGIC2,           /* Dolby Prologic 2.  Playstation 2 and Gamecube only.  PlayStation 2 doesnt support interior panning, but supports 48 voices simultaneously. */
639    FSOUND_SPEAKERMODE_PROLOGIC2_INTERIOR   /* Dolby Prologic 2.  Playstation 2 and Gamecube only.  PlayStation 2 does support interior panning, but only supports 24 voices simultaneously. */
640};
641
642
643/*
644[DEFINE_START]
645[
646    [NAME]
647    FSOUND_INIT_FLAGS
648   
649    [DESCRIPTION]   
650    Initialization flags.  Use them with FSOUND_Init in the flags parameter to change various behaviour.
651   
652    FSOUND_INIT_ENABLESYSTEMCHANNELFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
653    Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
654    This can be fixed with FSOUND_SetBufferSize.  Increase the BufferSize until it works.
655    When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
656
657    [SEE_ALSO]
658    FSOUND_Init
659]
660*/
661#define FSOUND_INIT_USEDEFAULTMIDISYNTH     0x0001    /* Win32 only - Causes MIDI playback to force software decoding. */
662#define FSOUND_INIT_GLOBALFOCUS             0x0002    /* Win32 only - For DirectSound output - sound is not muted when window is out of focus. */
663#define FSOUND_INIT_ENABLESYSTEMCHANNELFX   0x0004    /* Win32 only - For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! (use FSOUND_SYSTEMCHANNEL as channel id) */
664#define FSOUND_INIT_ACCURATEVULEVELS        0x0008    /* This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit */
665#define FSOUND_INIT_PS2_DISABLECORE0REVERB  0x0010    /* PS2 only   - Disable reverb on CORE 0 (SPU2 voices 00-23) to regain SRAM */
666#define FSOUND_INIT_PS2_DISABLECORE1REVERB  0x0020    /* PS2 only   - Disable reverb on CORE 1 (SPU2 voices 24-47) to regain SRAM */
667#define FSOUND_INIT_PS2_SWAPDMACORES        0x0040    /* PS2 only   - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around */
668#define FSOUND_INIT_DONTLATENCYADJUST       0x0080    /* Callbacks are not latency adjusted, and are called at mix time.  Also information functions are immediate */
669#define FSOUND_INIT_GC_INITLIBS             0x0100    /* GC only    - Initializes GC audio libraries */
670#define FSOUND_INIT_STREAM_FROM_MAIN_THREAD 0x0200    /* Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user */
671#define FSOUND_INIT_PS2_USEVOLUMERAMPING    0x0400    /* PS2 only   - Turns on volume ramping system to remove hardware clicks. */
672#define FSOUND_INIT_DSOUND_DEFERRED         0x0800    /* Win32 only - For DirectSound output.  3D commands are batched together and executed at FSOUND_Update. */
673#define FSOUND_INIT_DSOUND_HRTF_LIGHT       0x1000    /* Win32 only - For DirectSound output.  FSOUND_HW3D buffers use a slightly higher quality algorithm when 3d hardware acceleration is not present. */
674#define FSOUND_INIT_DSOUND_HRTF_FULL        0x2000    /* Win32 only - For DirectSound output.  FSOUND_HW3D buffers use full quality 3d playback when 3d hardware acceleration is not present. */
675#define FSOUND_INIT_XBOX_REMOVEHEADROOM     0x4000    /* XBox only - By default directsound attenuates all sound by 6db to avoid clipping/distortion.  CAUTION.  If you use this flag you are responsible for the final mix to make sure clipping / distortion doesn't happen. */
676#define FSOUND_INIT_PSP_SILENCEONUNDERRUN   0x8000    /* PSP only - If streams skip / stutter when device is powered on, either increase stream buffersize, or use this flag instead to play silence while the UMD is recovering. */
677/* [DEFINE_END] */
678
679
680/*
681[ENUM]
682[
683    [DESCRIPTION]   
684    Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream.
685
686    [SEE_ALSO]
687    FSOUND_Stream_Net_GetStatus
688]
689*/
690enum FSOUND_STREAM_NET_STATUS
691{
692    FSOUND_STREAM_NET_NOTCONNECTED = 0,     /* Stream hasn't connected yet */
693    FSOUND_STREAM_NET_CONNECTING,           /* Stream is connecting to remote host */
694    FSOUND_STREAM_NET_BUFFERING,            /* Stream is buffering data */
695    FSOUND_STREAM_NET_READY,                /* Stream is ready to play */
696    FSOUND_STREAM_NET_ERROR                 /* Stream has suffered a fatal error */
697};
698
699
700/*
701[ENUM]
702[
703    [DESCRIPTION]   
704    Describes the type of a particular tag field.
705
706    [SEE_ALSO]
707    FSOUND_Stream_GetNumTagFields
708    FSOUND_Stream_GetTagField
709    FSOUND_Stream_FindTagField
710]
711*/
712enum FSOUND_TAGFIELD_TYPE
713{
714    FSOUND_TAGFIELD_VORBISCOMMENT = 0,      /* A vorbis comment */
715    FSOUND_TAGFIELD_ID3V1,                  /* Part of an ID3v1 tag */
716    FSOUND_TAGFIELD_ID3V2,                  /* An ID3v2 frame */
717    FSOUND_TAGFIELD_SHOUTCAST,              /* A SHOUTcast header line */
718    FSOUND_TAGFIELD_ICECAST,                /* An Icecast header line */
719    FSOUND_TAGFIELD_ASF                     /* An Advanced Streaming Format header line */
720};
721
722
723/*
724[DEFINE_START]
725[
726    [NAME]
727    FSOUND_STATUS_FLAGS
728   
729    [DESCRIPTION]   
730    These values describe the protocol and format of an internet stream. Use FSOUND_Stream_Net_GetStatus to retrieve this information for an open internet stream.
731   
732    [SEE_ALSO]
733    FSOUND_Stream_Net_GetStatus
734]
735*/
736#define FSOUND_PROTOCOL_SHOUTCAST   0x00000001
737#define FSOUND_PROTOCOL_ICECAST     0x00000002
738#define FSOUND_PROTOCOL_HTTP        0x00000004
739#define FSOUND_FORMAT_MPEG          0x00010000
740#define FSOUND_FORMAT_OGGVORBIS     0x00020000
741/* [DEFINE_END] */
742
743
744/*
745[STRUCTURE]
746[
747    [DESCRIPTION]
748    Structure defining a CD table of contents. This structure is returned as a tag from FSOUND_Stream_FindTagField when the tag name "CD_TOC" is specified.
749    Note: All tracks on the CD - including data tracks- will be represented in this structure so it's use for anything other than generating disc id information is not recommended.
750    See the cdda example program for info on retrieving and using this structure.
751
752    [SEE_ALSO]
753    FSOUND_Stream_Open
754    FSOUND_Stream_FindTagField
755]
756*/
757typedef struct _FSOUND_TOC_TAG
758{
759    char name[4];                           /* The string "TOC", just in case this structure is accidentally treated as a string */
760    int  numtracks;                         /* The number of tracks on the CD */
761    int  min[100];                          /* The start offset of each track in minutes */
762    int  sec[100];                          /* The start offset of each track in seconds */
763    int  frame[100];                        /* The start offset of each track in frames */
764
765} FSOUND_TOC_TAG;
766
767
768/* ========================================================================================== */
769/* FUNCTION PROTOTYPES                                                                        */
770/* ========================================================================================== */
771
772#ifdef __cplusplus
773extern "C" {
774#endif
775
776/* ================================== */
777/* Initialization / Global functions. */
778/* ================================== */
779
780/*
781    PRE - FSOUND_Init functions. These can't be called after FSOUND_Init is
782    called (they will fail). They set up FMOD system functionality.
783*/
784
785DLL_API signed char     F_API FSOUND_SetOutput(int outputtype);
786DLL_API signed char     F_API FSOUND_SetDriver(int driver);
787DLL_API signed char     F_API FSOUND_SetMixer(int mixer);
788DLL_API signed char     F_API FSOUND_SetBufferSize(int len_ms);
789DLL_API signed char     F_API FSOUND_SetHWND(void *hwnd);
790DLL_API signed char     F_API FSOUND_SetMinHardwareChannels(int min);
791DLL_API signed char     F_API FSOUND_SetMaxHardwareChannels(int max);
792DLL_API signed char     F_API FSOUND_SetMemorySystem(void *pool,
793                                                     int poollen,
794                                                     FSOUND_ALLOCCALLBACK   useralloc,
795                                                     FSOUND_REALLOCCALLBACK userrealloc,
796                                                     FSOUND_FREECALLBACK    userfree);
797/*
798    Main initialization / closedown functions.
799    Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override
800           with MIDI playback.
801         : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter
802           which window is in focus. (FSOUND_OUTPUT_DSOUND only)
803*/
804
805DLL_API signed char     F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
806DLL_API void            F_API FSOUND_Close();
807
808/*
809    Runtime system level functions
810*/
811
812DLL_API void            F_API FSOUND_Update();   /* This is called to update 3d sound / non-realtime output */
813
814DLL_API void            F_API FSOUND_SetSpeakerMode(unsigned int speakermode);
815DLL_API void            F_API FSOUND_SetSFXMasterVolume(int volume);
816DLL_API void            F_API FSOUND_SetPanSeperation(float pansep);
817DLL_API void            F_API FSOUND_File_SetCallbacks(FSOUND_OPENCALLBACK  useropen,
818                                                       FSOUND_CLOSECALLBACK userclose,
819                                                       FSOUND_READCALLBACK  userread,
820                                                       FSOUND_SEEKCALLBACK  userseek,
821                                                       FSOUND_TELLCALLBACK  usertell);
822
823/*
824    System information functions.
825*/
826
827DLL_API int             F_API FSOUND_GetError();
828DLL_API float           F_API FSOUND_GetVersion();
829DLL_API int             F_API FSOUND_GetOutput();
830DLL_API void *          F_API FSOUND_GetOutputHandle();
831DLL_API int             F_API FSOUND_GetDriver();
832DLL_API int             F_API FSOUND_GetMixer();
833DLL_API int             F_API FSOUND_GetNumDrivers();
834DLL_API const char *    F_API FSOUND_GetDriverName(int id);
835DLL_API signed char     F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
836DLL_API int             F_API FSOUND_GetOutputRate();
837DLL_API int             F_API FSOUND_GetMaxChannels();
838DLL_API int             F_API FSOUND_GetMaxSamples();
839DLL_API unsigned int    F_API FSOUND_GetSpeakerMode();
840DLL_API int             F_API FSOUND_GetSFXMasterVolume();
841DLL_API signed char     F_API FSOUND_GetNumHWChannels(int *num2d, int *num3d, int *total);
842DLL_API int             F_API FSOUND_GetChannelsPlaying();
843DLL_API float           F_API FSOUND_GetCPUUsage();
844DLL_API void            F_API FSOUND_GetMemoryStats(unsigned int *currentalloced, unsigned int *maxalloced);
845
846/* =================================== */
847/* Sample management / load functions. */
848/* =================================== */
849
850/*
851    Sample creation and management functions
852    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Sample_Load to load from memory.
853           Use FSOUND_LOADRAW      flag with FSOUND_Sample_Load to treat as as raw pcm data.
854*/
855
856DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
857DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
858DLL_API void            F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
859DLL_API signed char     F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
860DLL_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);
861DLL_API signed char     F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
862
863/*
864    Sample control functions
865*/
866
867DLL_API signed char     F_API FSOUND_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode);
868DLL_API signed char     F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend);
869DLL_API signed char     F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri);
870DLL_API signed char     F_API FSOUND_Sample_SetDefaultsEx(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan);
871DLL_API signed char     F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max);
872DLL_API signed char     F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr, int max);
873
874/*
875    Sample information functions
876*/
877
878DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
879DLL_API const char *    F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
880DLL_API unsigned int    F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
881DLL_API signed char     F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
882DLL_API signed char     F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
883DLL_API signed char     F_API FSOUND_Sample_GetDefaultsEx(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri, int *varfreq, int *varvol, int *varpan);
884DLL_API unsigned int    F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr);
885DLL_API signed char     F_API FSOUND_Sample_GetMinMaxDistance(FSOUND_SAMPLE *sptr, float *min, float *max);
886 
887/* ============================ */
888/* Channel control functions.   */
889/* ============================ */
890
891/*
892    Playing and stopping sounds. 
893    Note : Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
894           Use FSOUND_ALL as the 'channel' variable to control ALL channels with one function call!
895*/
896
897DLL_API int             F_API FSOUND_PlaySound(int channel, FSOUND_SAMPLE *sptr);
898DLL_API int             F_API FSOUND_PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused);
899DLL_API signed char     F_API FSOUND_StopSound(int channel);
900
901/*
902    Functions to control playback of a channel.
903    Note : FSOUND_ALL can be used on most of these functions as a channel value.
904*/
905
906DLL_API signed char     F_API FSOUND_SetFrequency(int channel, int freq);
907DLL_API signed char     F_API FSOUND_SetVolume(int channel, int vol);
908DLL_API signed char     F_API FSOUND_SetVolumeAbsolute(int channel, int vol);
909DLL_API signed char     F_API FSOUND_SetPan(int channel, int pan);
910DLL_API signed char     F_API FSOUND_SetSurround(int channel, signed char surround);
911DLL_API signed char     F_API FSOUND_SetMute(int channel, signed char mute);
912DLL_API signed char     F_API FSOUND_SetPriority(int channel, int priority);
913DLL_API signed char     F_API FSOUND_SetReserved(int channel, signed char reserved);
914DLL_API signed char     F_API FSOUND_SetPaused(int channel, signed char paused);
915DLL_API signed char     F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode);
916DLL_API signed char     F_API FSOUND_SetCurrentPosition(int channel, unsigned int offset);
917DLL_API signed char     F_API FSOUND_3D_SetAttributes(int channel, const float *pos, const float *vel);
918DLL_API signed char     F_API FSOUND_3D_SetMinMaxDistance(int channel, float min, float max);
919
920/*
921    Channel information functions.
922*/
923
924DLL_API signed char     F_API FSOUND_IsPlaying(int channel);
925DLL_API int             F_API FSOUND_GetFrequency(int channel);
926DLL_API int             F_API FSOUND_GetVolume(int channel);
927DLL_API int             F_API FSOUND_GetAmplitude(int channel);
928DLL_API int             F_API FSOUND_GetPan(int channel);
929DLL_API signed char     F_API FSOUND_GetSurround(int channel);
930DLL_API signed char     F_API FSOUND_GetMute(int channel);
931DLL_API int             F_API FSOUND_GetPriority(int channel);
932DLL_API signed char     F_API FSOUND_GetReserved(int channel);
933DLL_API signed char     F_API FSOUND_GetPaused(int channel);
934DLL_API unsigned int    F_API FSOUND_GetLoopMode(int channel);
935DLL_API unsigned int    F_API FSOUND_GetCurrentPosition(int channel);
936DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel);
937DLL_API signed char     F_API FSOUND_GetCurrentLevels(int channel, float *l, float *r);
938DLL_API int             F_API FSOUND_GetNumSubChannels(int channel);
939DLL_API int             F_API FSOUND_GetSubChannel(int channel, int subchannel);
940DLL_API signed char     F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel);
941DLL_API signed char     F_API FSOUND_3D_GetMinMaxDistance(int channel, float *min, float *max);
942
943/* ========================== */
944/* Global 3D sound functions. */
945/* ========================== */
946
947/*
948    See also 3d sample and channel based functions above.
949    Call FSOUND_Update once a frame to process 3d information.
950*/
951
952DLL_API void            F_API FSOUND_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
953DLL_API void            F_API FSOUND_3D_Listener_GetAttributes(float *pos, float *vel, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz);
954DLL_API void            F_API FSOUND_3D_Listener_SetCurrent(int current, int numlisteners);  /* use this if you use multiple listeners / splitscreen */
955DLL_API void            F_API FSOUND_3D_SetDopplerFactor(float scale);
956DLL_API void            F_API FSOUND_3D_SetDistanceFactor(float scale);
957DLL_API void            F_API FSOUND_3D_SetRolloffFactor(float scale);
958
959/* =================== */
960/* FX functions.       */
961/* =================== */
962
963/*
964    Functions to control DX8 only effects processing.
965
966    - FX enabled samples can only be played once at a time, not multiple times at once.
967    - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
968    - FSOUND_INIT_ENABLESYSTEMCHANNELFX can be used to apply hardware effect processing to the
969      global mixed output of FMOD's software channels.
970    - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
971    - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
972      it will return a unique handle for each FX.
973    - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
974    - FSOUND_FX_Disable must be called to reset/clear the FX from a channel.
975*/
976
977DLL_API int             F_API FSOUND_FX_Enable(int channel, unsigned int fxtype);    /* See FSOUND_FX_MODES */
978DLL_API signed char     F_API FSOUND_FX_Disable(int channel);                        /* Disables all effects */
979
980DLL_API signed char     F_API FSOUND_FX_SetChorus(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
981DLL_API signed char     F_API FSOUND_FX_SetCompressor(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay);
982DLL_API signed char     F_API FSOUND_FX_SetDistortion(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff);
983DLL_API signed char     F_API FSOUND_FX_SetEcho(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay);
984DLL_API signed char     F_API FSOUND_FX_SetFlanger(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
985DLL_API signed char     F_API FSOUND_FX_SetGargle(int fxid, int RateHz, int WaveShape);
986DLL_API signed char     F_API FSOUND_FX_SetI3DL2Reverb(int fxid, int Room, int RoomHF, float RoomRolloffFactor, float DecayTime, float DecayHFRatio, int Reflections, float ReflectionsDelay, int Reverb, float ReverbDelay, float Diffusion, float Density, float HFReference);
987DLL_API signed char     F_API FSOUND_FX_SetParamEQ(int fxid, float Center, float Bandwidth, float Gain);
988DLL_API signed char     F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio); 
989 
990/* ========================= */
991/* File Streaming functions. */
992/* ========================= */
993
994/*
995    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Stream_Open to stream from memory.
996           Use FSOUND_LOADRAW      flag with FSOUND_Stream_Open to treat stream as raw pcm data.
997           Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_Open to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
998           Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
999*/
1000
1001DLL_API signed char        F_API FSOUND_Stream_SetBufferSize(int ms);      /* call this before opening streams, not after */
1002                           
1003DLL_API FSOUND_STREAM *    F_API FSOUND_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length);
1004DLL_API FSOUND_STREAM *    F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, void *userdata);
1005DLL_API signed char        F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
1006                           
1007DLL_API int                F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream);
1008DLL_API int                F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused);
1009DLL_API signed char        F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream);
1010                           
1011DLL_API signed char        F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, unsigned int position);
1012DLL_API unsigned int       F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream);
1013DLL_API signed char        F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms);
1014DLL_API int                F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream);
1015DLL_API int                F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream);
1016DLL_API int                F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream);
1017                           
1018DLL_API signed char        F_API FSOUND_Stream_SetMode(FSOUND_STREAM *stream, unsigned int mode);
1019DLL_API unsigned int       F_API FSOUND_Stream_GetMode(FSOUND_STREAM *stream);
1020DLL_API signed char        F_API FSOUND_Stream_SetLoopPoints(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm);
1021DLL_API signed char        F_API FSOUND_Stream_SetLoopCount(FSOUND_STREAM *stream, int count);
1022DLL_API int                F_API FSOUND_Stream_GetOpenState(FSOUND_STREAM *stream);                /* use with FSOUND_NONBLOCKING opened streams */
1023DLL_API FSOUND_SAMPLE *    F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream);
1024DLL_API FSOUND_DSPUNIT *   F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, void *userdata);
1025                           
1026DLL_API signed char        F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
1027DLL_API signed char        F_API FSOUND_Stream_SetSyncCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata);
1028
1029DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const char *name);
1030DLL_API signed char        F_API FSOUND_Stream_DeleteSyncPoint(FSOUND_SYNCPOINT *point);
1031DLL_API int                F_API FSOUND_Stream_GetNumSyncPoints(FSOUND_STREAM *stream);
1032DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_GetSyncPoint(FSOUND_STREAM *stream, int index);
1033DLL_API char *             F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset);
1034
1035DLL_API signed char        F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index);     /* For FMOD .FSB bank files. */
1036DLL_API int                F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream);            /* For FMOD .FSB bank files. */
1037DLL_API signed char        F_API FSOUND_Stream_SetSubStreamSentence(FSOUND_STREAM *stream, const int *sentencelist, int numitems);
1038
1039DLL_API signed char        F_API FSOUND_Stream_GetNumTagFields(FSOUND_STREAM *stream, int *num);
1040DLL_API signed char        F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, char **name, void **value, int *length);
1041DLL_API signed char        F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const char *name, void **value, int *length);
1042
1043/*
1044    Internet streaming functions
1045*/
1046
1047DLL_API signed char        F_API FSOUND_Stream_Net_SetProxy(const char *proxy);
1048DLL_API signed char        F_API FSOUND_Stream_Net_SetTimeout(int timeout);
1049DLL_API char *             F_API FSOUND_Stream_Net_GetLastServerStatus();
1050DLL_API signed char        F_API FSOUND_Stream_Net_SetBufferProperties(int buffersize, int prebuffer_percent, int rebuffer_percent);
1051DLL_API signed char        F_API FSOUND_Stream_Net_GetBufferProperties(int *buffersize, int *prebuffer_percent, int *rebuffer_percent);
1052DLL_API signed char        F_API FSOUND_Stream_Net_SetMetadataCallback(FSOUND_STREAM *stream, FSOUND_METADATACALLBACK callback, void *userdata);
1053DLL_API signed char        F_API FSOUND_Stream_Net_GetStatus(FSOUND_STREAM *stream, int *status, int *bufferpercentused, int *bitrate, unsigned int *flags);
1054
1055/* =================== */
1056/* CD audio functions. */
1057/* =================== */
1058
1059/*
1060    Note : 0 = default cdrom.  Otherwise specify the drive letter, for example. 'D'.
1061*/
1062
1063DLL_API signed char     F_API FSOUND_CD_Play(char drive, int track);
1064DLL_API void            F_API FSOUND_CD_SetPlayMode(char drive, signed char mode);
1065DLL_API signed char     F_API FSOUND_CD_Stop(char drive);
1066DLL_API signed char     F_API FSOUND_CD_SetPaused(char drive, signed char paused);
1067DLL_API signed char     F_API FSOUND_CD_SetVolume(char drive, int volume);
1068DLL_API signed char     F_API FSOUND_CD_SetTrackTime(char drive, unsigned int ms);
1069DLL_API signed char     F_API FSOUND_CD_OpenTray(char drive, signed char open);
1070
1071DLL_API signed char     F_API FSOUND_CD_GetPaused(char drive);
1072DLL_API int             F_API FSOUND_CD_GetTrack(char drive);
1073DLL_API int             F_API FSOUND_CD_GetNumTracks(char drive);
1074DLL_API int             F_API FSOUND_CD_GetVolume(char drive);
1075DLL_API int             F_API FSOUND_CD_GetTrackLength(char drive, int track);
1076DLL_API int             F_API FSOUND_CD_GetTrackTime(char drive);
1077
1078/* ============== */
1079/* DSP functions. */
1080/* ============== */
1081
1082/*
1083    DSP Unit control and information functions.
1084    These functions allow you access to the mixed stream that FMOD uses to play back sound on.
1085*/
1086
1087DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, void *userdata);
1088DLL_API void            F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit);
1089DLL_API void            F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority);
1090DLL_API int             F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit);
1091DLL_API void            F_API FSOUND_DSP_SetActive(FSOUND_DSPUNIT *unit, signed char active);
1092DLL_API signed char     F_API FSOUND_DSP_GetActive(FSOUND_DSPUNIT *unit);
1093
1094/*
1095    Functions to get hold of FSOUND 'system DSP unit' handles.
1096*/
1097
1098DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClearUnit();
1099DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetSFXUnit();
1100DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetMusicUnit();
1101DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetFFTUnit();
1102DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClipAndCopyUnit();
1103
1104/*
1105    Miscellaneous DSP functions
1106    Note for the spectrum analysis function to work, you have to enable the FFT DSP unit with
1107    the following code FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);
1108    It is off by default to save cpu usage.
1109*/
1110
1111DLL_API signed char     F_API FSOUND_DSP_MixBuffers(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode);
1112DLL_API void            F_API FSOUND_DSP_ClearMixBuffer();
1113DLL_API int             F_API FSOUND_DSP_GetBufferLength();      /* Length of each DSP update */
1114DLL_API int             F_API FSOUND_DSP_GetBufferLengthTotal(); /* Total buffer length due to FSOUND_SetBufferSize */
1115DLL_API float *         F_API FSOUND_DSP_GetSpectrum();          /* Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. */
1116
1117/* =================================================================================== */
1118/* Reverb functions. (eax2/eax3 reverb)  (ONLY SUPPORTED ON WIN32 W/ FSOUND_HW3D FLAG) */
1119/* =================================================================================== */
1120
1121/*
1122    See top of file for definitions and information on the reverb parameters.
1123*/
1124
1125DLL_API signed char     F_API FSOUND_Reverb_SetProperties(const FSOUND_REVERB_PROPERTIES *prop);
1126DLL_API signed char     F_API FSOUND_Reverb_GetProperties(FSOUND_REVERB_PROPERTIES *prop);
1127DLL_API signed char     F_API FSOUND_Reverb_SetChannelProperties(int channel, const FSOUND_REVERB_CHANNELPROPERTIES *prop);
1128DLL_API signed char     F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop);
1129
1130/* ===================================================== */
1131/* Recording functions  (ONLY SUPPORTED IN WIN32, WINCE) */
1132/* ===================================================== */
1133
1134/*
1135    Recording initialization functions
1136*/
1137
1138DLL_API signed char     F_API FSOUND_Record_SetDriver(int outputtype);
1139DLL_API int             F_API FSOUND_Record_GetNumDrivers();
1140DLL_API const char *    F_API FSOUND_Record_GetDriverName(int id);
1141DLL_API int             F_API FSOUND_Record_GetDriver();
1142
1143/*
1144    Recording functionality.  Only one recording session will work at a time.
1145*/
1146
1147DLL_API signed char     F_API FSOUND_Record_StartSample(FSOUND_SAMPLE *sptr, signed char loop);
1148DLL_API signed char     F_API FSOUND_Record_Stop();
1149DLL_API int             F_API FSOUND_Record_GetPosition(); 
1150
1151/* ========================================================================================== */
1152/* FMUSIC API (MOD,S3M,XM,IT,MIDI PLAYBACK)                                                   */
1153/* ========================================================================================== */
1154
1155/*
1156    Song management / playback functions.
1157*/
1158
1159DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
1160DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const char *name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum);
1161DLL_API int             F_API FMUSIC_GetOpenState(FMUSIC_MODULE *mod);
1162DLL_API signed char     F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
1163DLL_API signed char     F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
1164DLL_API signed char     F_API FMUSIC_StopSong(FMUSIC_MODULE *mod);
1165DLL_API void            F_API FMUSIC_StopAllSongs();
1166
1167DLL_API signed char     F_API FMUSIC_SetZxxCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback);
1168DLL_API signed char     F_API FMUSIC_SetRowCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep);
1169DLL_API signed char     F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep);
1170DLL_API signed char     F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument);
1171
1172DLL_API signed char     F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr);
1173DLL_API signed char     F_API FMUSIC_SetUserData(FMUSIC_MODULE *mod, void *userdata);
1174DLL_API signed char     F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume);
1175
1176/*
1177    Runtime song functions.
1178*/
1179
1180DLL_API signed char     F_API FMUSIC_SetReverb(signed char reverb);             /* MIDI only */
1181DLL_API signed char     F_API FMUSIC_SetLooping(FMUSIC_MODULE *mod, signed char looping);
1182DLL_API signed char     F_API FMUSIC_SetOrder(FMUSIC_MODULE *mod, int order);
1183DLL_API signed char     F_API FMUSIC_SetPaused(FMUSIC_MODULE *mod, signed char pause);
1184DLL_API signed char     F_API FMUSIC_SetMasterVolume(FMUSIC_MODULE *mod, int volume);
1185DLL_API signed char     F_API FMUSIC_SetMasterSpeed(FMUSIC_MODULE *mode, float speed);
1186DLL_API signed char     F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float pansep);
1187 
1188/*
1189    Static song information functions.
1190*/
1191
1192DLL_API const char *    F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
1193DLL_API int             F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
1194DLL_API int             F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
1195DLL_API int             F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
1196DLL_API int             F_API FMUSIC_GetNumInstruments(FMUSIC_MODULE *mod);
1197DLL_API int             F_API FMUSIC_GetNumSamples(FMUSIC_MODULE *mod);
1198DLL_API int             F_API FMUSIC_GetNumChannels(FMUSIC_MODULE *mod);
1199DLL_API FSOUND_SAMPLE * F_API FMUSIC_GetSample(FMUSIC_MODULE *mod, int sampno);
1200DLL_API int             F_API FMUSIC_GetPatternLength(FMUSIC_MODULE *mod, int orderno);
1201 
1202/*
1203    Runtime song information.
1204*/
1205
1206DLL_API signed char     F_API FMUSIC_IsFinished(FMUSIC_MODULE *mod);
1207DLL_API signed char     F_API FMUSIC_IsPlaying(FMUSIC_MODULE *mod);
1208DLL_API int             F_API FMUSIC_GetMasterVolume(FMUSIC_MODULE *mod);
1209DLL_API int             F_API FMUSIC_GetGlobalVolume(FMUSIC_MODULE *mod);
1210DLL_API int             F_API FMUSIC_GetOrder(FMUSIC_MODULE *mod);
1211DLL_API int             F_API FMUSIC_GetPattern(FMUSIC_MODULE *mod);
1212DLL_API int             F_API FMUSIC_GetSpeed(FMUSIC_MODULE *mod);
1213DLL_API int             F_API FMUSIC_GetBPM(FMUSIC_MODULE *mod);
1214DLL_API int             F_API FMUSIC_GetRow(FMUSIC_MODULE *mod);
1215DLL_API signed char     F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod);
1216DLL_API int             F_API FMUSIC_GetTime(FMUSIC_MODULE *mod);
1217DLL_API int             F_API FMUSIC_GetRealChannel(FMUSIC_MODULE *mod, int modchannel);
1218DLL_API void *          F_API FMUSIC_GetUserData(FMUSIC_MODULE *mod);
1219
1220#ifdef __cplusplus
1221}
1222#endif
1223
1224#endif
Note: See TracBrowser for help on using the repository browser.