Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
244 chris 1
/* ========================================================================================== */
2
/* FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd 1999-2002.           */
3
/* ========================================================================================== */
4
 
5
#ifndef _FMOD_H_
6
#define _FMOD_H_
7
 
8
/* ========================================================================================== */
9
/* DEFINITIONS                                                                                */
10
/* ========================================================================================== */
11
 
12
#if !defined(WIN32) || (defined(__GNUC__) && defined(WIN32))
13
    #ifndef _cdecl
14
        #define _cdecl 
15
    #endif
16
    #ifndef _stdcall
17
        #define _stdcall
18
    #endif
19
#endif 
20
 
21
#define F_API _stdcall
22
 
23
#ifdef DLL_EXPORTS
24
    #define DLL_API __declspec(dllexport)
25
#else
26
    #if defined(__LCC__) || defined(__MINGW32__) || defined(__CYGWIN32__)
27
        #define DLL_API F_API
28
    #else
29
        #define DLL_API
30
    #endif /* __LCC__ ||  __MINGW32__ || __CYGWIN32__ */
31
#endif /* DLL_EXPORTS */
32
 
33
#define FMOD_VERSION    3.6f
34
 
35
/*
36
    FMOD defined types
37
*/
38
typedef struct FSOUND_SAMPLE    FSOUND_SAMPLE;
39
typedef struct FSOUND_STREAM    FSOUND_STREAM;
40
typedef struct FSOUND_DSPUNIT   FSOUND_DSPUNIT;
41
typedef struct FMUSIC_MODULE    FMUSIC_MODULE;
42
 
43
/*
44
    Callback types
45
*/
46
typedef void *      (_cdecl *FSOUND_DSPCALLBACK)    (void *originalbuffer, void *newbuffer, int length, int param);
47
typedef signed char (_cdecl *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, int param);
48
typedef void *      (_cdecl *FSOUND_ALLOCCALLBACK)  (unsigned int size);
49
typedef void *      (_cdecl *FSOUND_REALLOCCALLBACK)(void *ptr, unsigned int size);
50
typedef void        (_cdecl *FSOUND_FREECALLBACK)   (void *ptr);
51
typedef unsigned int(_cdecl *FSOUND_OPENCALLBACK)   (const char *name);
52
typedef void        (_cdecl *FSOUND_CLOSECALLBACK)  (unsigned int handle);
53
typedef int         (_cdecl *FSOUND_READCALLBACK)   (void *buffer, int size, unsigned int handle);
54
typedef int         (_cdecl *FSOUND_SEEKCALLBACK)   (unsigned int handle, int pos, signed char mode);
55
typedef int         (_cdecl *FSOUND_TELLCALLBACK)   (unsigned int handle);
56
typedef void        (_cdecl *FMUSIC_CALLBACK)       (FMUSIC_MODULE *mod, unsigned char param);
57
 
58
 
59
/*
60
[ENUM]
61
[
62
    [DESCRIPTION]  
63
    On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
64
 
65
    [SEE_ALSO]      
66
    FSOUND_GetError
67
]
68
*/
69
enum FMOD_ERRORS
70
{
71
    FMOD_ERR_NONE,             /* No errors */
72
    FMOD_ERR_BUSY,             /* Cannot call this command after FSOUND_Init.  Call FSOUND_Close first. */
73
    FMOD_ERR_UNINITIALIZED,    /* This command failed because FSOUND_Init or FSOUND_SetOutput was not called */
74
    FMOD_ERR_INIT,             /* Error initializing output device. */
75
    FMOD_ERR_ALLOCATED,        /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
76
    FMOD_ERR_PLAY,             /* Playing the sound failed. */
77
    FMOD_ERR_OUTPUT_FORMAT,    /* Soundcard does not support the features needed for this soundsystem (16bit stereo output) */
78
    FMOD_ERR_COOPERATIVELEVEL, /* Error setting cooperative level for hardware. */
79
    FMOD_ERR_CREATEBUFFER,     /* Error creating hardware sound buffer. */
80
    FMOD_ERR_FILE_NOTFOUND,    /* File not found */
81
    FMOD_ERR_FILE_FORMAT,      /* Unknown file format */
82
    FMOD_ERR_FILE_BAD,         /* Error loading file */
83
    FMOD_ERR_MEMORY,           /* Not enough memory or resources */
84
    FMOD_ERR_VERSION,          /* The version number of this file format is not supported */
85
    FMOD_ERR_INVALID_PARAM,    /* An invalid parameter was passed to this function */
86
    FMOD_ERR_NO_EAX,           /* Tried to use an EAX command on a non EAX enabled channel or output. */
87
    FMOD_ERR_CHANNEL_ALLOC,    /* Failed to allocate a new channel */
88
    FMOD_ERR_RECORD,           /* Recording is not supported on this machine */
89
    FMOD_ERR_MEDIAPLAYER,      /* Windows Media Player not installed so cannot play wma or use internet streaming. */
90
    FMOD_ERR_CDDEVICE          /* An error occured trying to open the specified CD device */
91
};
92
 
93
 
94
/*
95
[ENUM]
96
[
97
    [DESCRIPTION]  
98
    These output types are used with FSOUND_SetOutput, to choose which output driver to use.
99
 
100
    FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
101
    does not support DirectX 6 Voice Manager Extensions.
102
 
103
    FSOUND_OUTPUT_WINMM is recommended for NT and CE.
104
 
105
    [SEE_ALSO]      
106
    FSOUND_SetOutput
107
    FSOUND_GetOutput
108
]
109
*/
110
enum FSOUND_OUTPUTTYPES
111
{
112
    FSOUND_OUTPUT_NOSOUND,    /* NoSound driver, all calls to this succeed but do nothing. */
113
    FSOUND_OUTPUT_WINMM,      /* Windows Multimedia driver. */
114
    FSOUND_OUTPUT_DSOUND,     /* DirectSound driver.  You need this to get EAX2 or EAX3 support, or FX api support. */
115
    FSOUND_OUTPUT_A3D,        /* A3D driver.  not supported any more. */
116
 
117
    FSOUND_OUTPUT_OSS,        /* Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. */
118
    FSOUND_OUTPUT_ESD,        /* Linux/Unix ESD (Enlightment Sound Daemon) driver. */
119
    FSOUND_OUTPUT_ALSA,       /* Linux Alsa driver. */
120
 
121
    FSOUND_OUTPUT_ASIO,       /* Low latency ASIO driver */
122
    FSOUND_OUTPUT_XBOX,       /* Xbox driver */
123
    FSOUND_OUTPUT_PS2,        /* PlayStation 2 driver */
124
    FSOUND_OUTPUT_MAC         /* Mac SoundMager driver */
125
};
126
 
127
 
128
/*
129
[ENUM]
130
[
131
    [DESCRIPTION]  
132
    These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
133
    upon for other reasons using FSOUND_GetMixer.
134
    It is not nescessary to set the mixer.  FMOD will autodetect the best mixer for you.
135
 
136
    [SEE_ALSO]      
137
    FSOUND_SetMixer
138
    FSOUND_GetMixer
139
]
140
*/
141
enum FSOUND_MIXERTYPES
142
{
143
    FSOUND_MIXER_AUTODETECT,        /* CE/PS2 Only - Non interpolating/low quality mixer. */
144
    FSOUND_MIXER_BLENDMODE,         /* removed / obsolete. */
145
    FSOUND_MIXER_MMXP5,             /* removed / obsolete. */
146
    FSOUND_MIXER_MMXP6,             /* removed / obsolete. */
147
 
148
    FSOUND_MIXER_QUALITY_AUTODETECT,/* All platforms - Autodetect the fastest quality mixer based on your cpu. */
149
    FSOUND_MIXER_QUALITY_FPU,       /* Win32/Linux only - Interpolating/volume ramping FPU mixer.  */
150
    FSOUND_MIXER_QUALITY_MMXP5,     /* Win32/Linux only - Interpolating/volume ramping P5 MMX mixer.  */
151
    FSOUND_MIXER_QUALITY_MMXP6,     /* Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer. */
152
 
153
    FSOUND_MIXER_MONO,              /* CE/PS2 only - MONO non interpolating/low quality mixer. For speed*/
154
    FSOUND_MIXER_QUALITY_MONO,      /* CE/PS2 only - MONO Interpolating mixer.  For speed */
155
 
156
    FSOUND_MIXER_MAX
157
};
158
 
159
 
160
/*
161
[ENUM]
162
[
163
    [DESCRIPTION]  
164
    These definitions describe the type of song being played.
165
 
166
    [SEE_ALSO]      
167
    FMUSIC_GetType  
168
]
169
*/
170
enum FMUSIC_TYPES
171
{
172
    FMUSIC_TYPE_NONE,      
173
    FMUSIC_TYPE_MOD,        /* Protracker / Fasttracker */
174
    FMUSIC_TYPE_S3M,        /* ScreamTracker 3 */
175
    FMUSIC_TYPE_XM,         /* FastTracker 2 */
176
    FMUSIC_TYPE_IT,         /* Impulse Tracker. */
177
    FMUSIC_TYPE_MIDI        /* MIDI file */
178
};
179
 
180
 
181
/*
182
[DEFINE_START]
183
[
184
    [NAME]
185
    FSOUND_DSP_PRIORITIES
186
 
187
    [DESCRIPTION]  
188
    These default priorities are used by FMOD internal system DSP units.  They describe the
189
    position of the DSP chain, and the order of how audio processing is executed.
190
    You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
191
    unit), disable or even change the priority of a DSP unit.
192
 
193
    [SEE_ALSO]      
194
    FSOUND_DSP_Create
195
    FSOUND_DSP_SetPriority
196
    FSOUND_DSP_GetSpectrum
197
]
198
*/
199
#define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT        0       /* DSP CLEAR unit - done first */
200
#define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT          100     /* DSP SFX unit - done second */
201
#define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT        200     /* DSP MUSIC unit - done third */
202
#define FSOUND_DSP_DEFAULTPRIORITY_USER             300     /* User priority, use this as reference */
203
#define FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT          900     /* This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units */
204
#define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT  1000    /* DSP CLIP AND COPY unit - last */
205
/* [DEFINE_END] */
206
 
207
 
208
/*
209
[DEFINE_START]
210
[
211
    [NAME]
212
    FSOUND_CAPS
213
 
214
    [DESCRIPTION]  
215
    Driver description bitfields.  Use FSOUND_Driver_GetCaps to determine if a driver enumerated
216
    has the settings you are after.  The enumerated driver depends on the output mode, see
217
    FSOUND_OUTPUTTYPES
218
 
219
    [SEE_ALSO]
220
    FSOUND_GetDriverCaps
221
    FSOUND_OUTPUTTYPES
222
]
223
*/
224
#define FSOUND_CAPS_HARDWARE                0x1     /* This driver supports hardware accelerated 3d sound. */
225
#define FSOUND_CAPS_EAX2                    0x2     /* This driver supports EAX 2 reverb */
226
#define FSOUND_CAPS_EAX3                    0x10    /* This driver supports EAX 3 reverb */
227
/* [DEFINE_END] */
228
 
229
 
230
/*
231
[DEFINE_START]
232
[
233
    [NAME]
234
    FSOUND_MODES
235
 
236
    [DESCRIPTION]  
237
    Sample description bitfields, OR them together for loading and describing samples.
238
    NOTE.  If the file format being loaded already has a defined format, such as WAV or MP3, then
239
    trying to override the pre-defined format with a new set of format flags will not work.  For
240
    example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS.  It will just
241
    ignore the flag and go ahead loading it as 8bits.  For these type of formats the only flags
242
    you can specify that will really alter the behaviour of how it is loaded, are the following.
243
 
244
    FSOUND_LOOP_OFF    
245
    FSOUND_LOOP_NORMAL  
246
    FSOUND_LOOP_BIDI    
247
    FSOUND_HW3D
248
    FSOUND_2D
249
    FSOUND_STREAMABLE  
250
    FSOUND_LOADMEMORY  
251
    FSOUND_LOADRAW          
252
    FSOUND_MPEGACCURATE    
253
 
254
    See flag descriptions for what these do.
255
]
256
*/
257
#define FSOUND_LOOP_OFF     0x00000001  /* For non looping samples. */
258
#define FSOUND_LOOP_NORMAL  0x00000002  /* For forward looping samples. */
259
#define FSOUND_LOOP_BIDI    0x00000004  /* For bidirectional looping samples.  (no effect if in hardware). */
260
#define FSOUND_8BITS        0x00000008  /* For 8 bit samples. */
261
#define FSOUND_16BITS       0x00000010  /* For 16 bit samples. */
262
#define FSOUND_MONO         0x00000020  /* For mono samples. */
263
#define FSOUND_STEREO       0x00000040  /* For stereo samples. */
264
#define FSOUND_UNSIGNED     0x00000080  /* For user created source data containing unsigned samples. */
265
#define FSOUND_SIGNED       0x00000100  /* For user created source data containing signed data. */
266
#define FSOUND_DELTA        0x00000200  /* For user created source data stored as delta values. */
267
#define FSOUND_IT214        0x00000400  /* For user created source data stored using IT214 compression. */
268
#define FSOUND_IT215        0x00000800  /* For user created source data stored using IT215 compression. */
269
#define FSOUND_HW3D         0x00001000  /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
270
#define FSOUND_2D           0x00002000  /* Tells software (not hardware) based sample not to be included in 3d processing. */
271
#define FSOUND_STREAMABLE   0x00004000  /* For a streamimg sound where you feed the data to it. */
272
#define FSOUND_LOADMEMORY   0x00008000  /* "name" will be interpreted as a pointer to data for streaming and samples. */
273
#define FSOUND_LOADRAW      0x00010000  /* Will ignore file format and treat as raw pcm. */
274
#define FSOUND_MPEGACCURATE 0x00020000  /* For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime.  WARNING, see FSOUND_Stream_OpenFile for inital opening time performance issues. */
275
#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 */
276
#define FSOUND_HW2D         0x00080000  /* 2D hardware sounds.  allows hardware specific effects */
277
#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 */
278
#define FSOUND_MPEGHALFRATE 0x00200000  /* For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution */
279
#define FSOUND_XADPCM       0x00400000  /* For XBOX only - Describes a user sample that its contents are compressed as XADPCM  */
280
#define FSOUND_VAG          0x00800000  /* For PS2 only - Describes a user sample that its contents are compressed as Sony VAG format */
281
#define FSOUND_NONBLOCKING  0x01000000  /* For FSOUND_Stream_OpenFile - Causes stream to open in the background and not block the foreground app - stream functions only work when ready.  Poll any stream function determine when it IS ready. */
282
 
283
#define FSOUND_NORMAL       (FSOUND_16BITS | FSOUND_SIGNED | FSOUND_MONO)      
284
/* [DEFINE_END] */
285
 
286
 
287
 
288
/*
289
[DEFINE_START]
290
[
291
    [NAME]
292
    FSOUND_CDPLAYMODES
293
 
294
    [DESCRIPTION]  
295
    Playback method for a CD Audio track, with FSOUND_CD_SetPlayMode
296
 
297
    [SEE_ALSO]    
298
    FSOUND_CD_SetPlayMode  
299
    FSOUND_CD_Play
300
]
301
*/
302
#define FSOUND_CD_PLAYCONTINUOUS    0   /* Starts from the current track and plays to end of CD. */
303
#define FSOUND_CD_PLAYONCE          1   /* Plays the specified track then stops. */
304
#define FSOUND_CD_PLAYLOOPED        2   /* Plays the specified track looped, forever until stopped manually. */
305
#define FSOUND_CD_PLAYRANDOM        3   /* Plays tracks in random order */
306
/* [DEFINE_END] */
307
 
308
 
309
/*
310
[DEFINE_START]
311
[
312
    [NAME]
313
    FSOUND_MISC_VALUES
314
 
315
    [DESCRIPTION]
316
    Miscellaneous values for FMOD functions.
317
 
318
    [SEE_ALSO]
319
    FSOUND_PlaySound
320
    FSOUND_PlaySoundEx
321
    FSOUND_Sample_Alloc
322
    FSOUND_Sample_Load
323
    FSOUND_SetPan
324
]
325
*/
326
#define FSOUND_FREE             -1      /* value to play on any free channel, or to allocate a sample in a free sample slot. */
327
#define FSOUND_UNMANAGED        -2      /* value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot. */
328
#define FSOUND_ALL              -3      /* for a channel index , this flag will affect ALL channels available!  Not supported by every function. */
329
#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. */
330
#define FSOUND_SYSTEMCHANNEL    -1000   /* special 'channel' ID for all channel based functions that want to alter the global FSOUND software mixing output channel */
331
#define FSOUND_SYSTEMSAMPLE     -1000   /* special 'sample' ID for all sample based functions that want to alter the global FSOUND software mixing output sample */
332
 
333
/* [DEFINE_END] */
334
 
335
 
336
/*
337
[STRUCTURE]
338
[
339
    [DESCRIPTION]
340
    Structure defining a reverb environment.
341
 
342
    For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3
343
    documentation at http://developer.creative.com/ under the 'downloads' section.
344
    If they do not have the EAX3 documentation, then most information can be attained from
345
    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
346
    EAX2.
347
    Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
348
    Note that integer values that typically range from -10,000 to 1000 are represented in
349
    decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
350
    PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).  
351
    Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
352
    the reverb should product a similar effect on either platform.
353
    Linux and FMODCE do not support the reverb api.
354
 
355
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
356
 
357
    [SEE_ALSO]
358
    FSOUND_Reverb_SetProperties
359
    FSOUND_Reverb_GetProperties
360
    FSOUND_REVERB_PRESETS
361
    FSOUND_REVERB_FLAGS
362
]
363
*/
364
typedef struct _FSOUND_REVERB_PROPERTIES /* MIN     MAX    DEFAULT   DESCRIPTION */
365
{                                  
366
    unsigned int Environment;            /* 0     , 25    , 0      , sets all listener properties (win32/ps2 only) */
367
    float        EnvSize;                /* 1.0   , 100.0 , 7.5    , environment size in meters (win32 only) */
368
    float        EnvDiffusion;           /* 0.0   , 1.0   , 1.0    , environment diffusion (win32/xbox) */
369
    int          Room;                   /* -10000, 0     , -1000  , room effect level (at mid frequencies) (win32/xbox/ps2) */
370
    int          RoomHF;                 /* -10000, 0     , -100   , relative room effect level at high frequencies (win32/xbox) */
371
    int          RoomLF;                 /* -10000, 0     , 0      , relative room effect level at low frequencies (win32 only) */
372
    float        DecayTime;              /* 0.1   , 20.0  , 1.49   , reverberation decay time at mid frequencies (win32/xbox) */
373
    float        DecayHFRatio;           /* 0.1   , 2.0   , 0.83   , high-frequency to mid-frequency decay time ratio (win32/xbox) */
374
    float        DecayLFRatio;           /* 0.1   , 2.0   , 1.0    , low-frequency to mid-frequency decay time ratio (win32 only) */
375
    int          Reflections;            /* -10000, 1000  , -2602  , early reflections level relative to room effect (win32/xbox) */
376
    float        ReflectionsDelay;       /* 0.0   , 0.3   , 0.007  , initial reflection delay time (win32/xbox) */
377
    float        ReflectionsPan[3];      /*       ,       , [0,0,0], early reflections panning vector (win32 only) */
378
    int          Reverb;                 /* -10000, 2000  , 200    , late reverberation level relative to room effect (win32/xbox) */
379
    float        ReverbDelay;            /* 0.0   , 0.1   , 0.011  , late reverberation delay time relative to initial reflection (win32/xbox) */
380
    float        ReverbPan[3];           /*       ,       , [0,0,0], late reverberation panning vector (win32 only) */
381
    float        EchoTime;               /* .075  , 0.25  , 0.25   , echo time (win32 only) */
382
    float        EchoDepth;              /* 0.0   , 1.0   , 0.0    , echo depth (win32 only) */
383
    float        ModulationTime;         /* 0.04  , 4.0   , 0.25   , modulation time (win32 only) */
384
    float        ModulationDepth;        /* 0.0   , 1.0   , 0.0    , modulation depth (win32 only) */
385
    float        AirAbsorptionHF;        /* -100  , 0.0   , -5.0   , change in level per meter at high frequencies (win32 only) */
386
    float        HFReference;            /* 1000.0, 20000 , 5000.0 , reference high frequency (hz) (win32/xbox) */
387
    float        LFReference;            /* 20.0  , 1000.0, 250.0  , reference low frequency (hz) (win32 only) */
388
    float        RoomRolloffFactor;      /* 0.0   , 10.0  , 0.0    , like FSOUND_3D_Listener_SetRolloffFactor but for room effect (win32/xbox) */
389
    float        Diffusion;              /* 0.0   , 100.0 , 100.0  , Value that controls the echo density in the late reverberation decay. (xbox only) */
390
    float        Density;                /* 0.0   , 100.0 , 100.0  , Value that controls the modal density in the late reverberation decay (xbox only) */
391
    unsigned int Flags;                  /* FSOUND_REVERB_FLAGS - modifies the behavior of above properties (win32 only) */
392
} FSOUND_REVERB_PROPERTIES;
393
 
394
 
395
/*
396
[DEFINE_START]
397
[
398
    [NAME]
399
    FSOUND_REVERB_FLAGS
400
 
401
    [DESCRIPTION]
402
    Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
403
 
404
    [SEE_ALSO]
405
    FSOUND_REVERB_PROPERTIES
406
]
407
*/
408
#define FSOUND_REVERB_FLAGS_DECAYTIMESCALE        0x00000001 /* 'EnvSize' affects reverberation decay time */
409
#define FSOUND_REVERB_FLAGS_REFLECTIONSSCALE      0x00000002 /* 'EnvSize' affects reflection level */
410
#define FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE 0x00000004 /* 'EnvSize' affects initial reflection delay time */
411
#define FSOUND_REVERB_FLAGS_REVERBSCALE           0x00000008 /* 'EnvSize' affects reflections level */
412
#define FSOUND_REVERB_FLAGS_REVERBDELAYSCALE      0x00000010 /* 'EnvSize' affects late reverberation delay time */
413
#define FSOUND_REVERB_FLAGS_DECAYHFLIMIT          0x00000020 /* AirAbsorptionHF affects DecayHFRatio */
414
#define FSOUND_REVERB_FLAGS_ECHOTIMESCALE         0x00000040 /* 'EnvSize' affects echo time */
415
#define FSOUND_REVERB_FLAGS_MODULATIONTIMESCALE   0x00000080 /* 'EnvSize' affects modulation time */
416
#define FSOUND_REVERB_FLAGS_CORE0                 0x00000100 /* PS2 Only - Reverb is applied to CORE0 (hw voices 0-23) */
417
#define FSOUND_REVERB_FLAGS_CORE1                 0x00000200 /* PS2 Only - Reverb is applied to CORE1 (hw voices 24-47) */
418
#define FSOUND_REVERB_FLAGS_DEFAULT              (FSOUND_REVERB_FLAGS_DECAYTIMESCALE |        \
419
                                                  FSOUND_REVERB_FLAGS_REFLECTIONSSCALE |      \
420
                                                  FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE | \
421
                                                  FSOUND_REVERB_FLAGS_REVERBSCALE |           \
422
                                                  FSOUND_REVERB_FLAGS_REVERBDELAYSCALE |      \
423
                                                  FSOUND_REVERB_FLAGS_DECAYHFLIMIT |          \
424
                                                  FSOUND_REVERB_FLAGS_CORE0 |                 \
425
                                                  FSOUND_REVERB_FLAGS_CORE1 )
426
/* [DEFINE_END] */
427
 
428
 
429
 
430
 
431
/*
432
[DEFINE_START]
433
[
434
    [NAME]
435
    FSOUND_REVERB_PRESETS
436
 
437
    [DESCRIPTION]  
438
    A set of predefined environment PARAMETERS, created by Creative Labs
439
    These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
440
    ie
441
    FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
442
 
443
    [SEE_ALSO]
444
    FSOUND_Reverb_SetProperties
445
]
446
*/
447
/*                                     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 */
448
#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 }
449
#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 }
450
#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 }
451
#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 }
452
#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 }
453
#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 }
454
#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 }
455
#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 }
456
#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 }
457
#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 }
458
#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 }
459
#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 }
460
#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 }
461
#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 }
462
#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 }
463
#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 }
464
#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 }
465
#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 }
466
#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 }
467
#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 }
468
#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 }
469
#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 }
470
#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 }
471
#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 }
472
 
473
/* Non I3DL2 presets */
474
 
475
#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 }
476
#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 }
477
#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 }
478
 
479
/* PlayStation 2 Only presets */
480
 
481
#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 }
482
#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 }
483
#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 }
484
#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 }
485
#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 }
486
#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 }
487
#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 }
488
#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 }
489
#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 }
490
 
491
/* [DEFINE_END] */
492
 
493
 
494
/*
495
[STRUCTURE]
496
[
497
    [DESCRIPTION]
498
    Structure defining the properties for a reverb source, related to a FSOUND channel.
499
 
500
    For more indepth descriptions of the reverb properties under win32, please see the EAX3
501
    documentation at http://developer.creative.com/ under the 'downloads' section.
502
    If they do not have the EAX3 documentation, then most information can be attained from
503
    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
504
    EAX2.
505
 
506
    Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
507
    Note that integer values that typically range from -10,000 to 1000 are represented in
508
    decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
509
    PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).  
510
    Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
511
    the reverb should product a similar effect on either platform.
512
    Linux and FMODCE do not support the reverb api.
513
 
514
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
515
 
516
    [SEE_ALSO]
517
    FSOUND_Reverb_SetChannelProperties
518
    FSOUND_Reverb_GetChannelProperties
519
    FSOUND_REVERB_CHANNELFLAGS
520
]
521
*/
522
typedef struct _FSOUND_REVERB_CHANNELPROPERTIES /* MIN     MAX    DEFAULT */
523
{                                  
524
    int    Direct;                              /* -10000, 1000,  0,    direct path level (at low and mid frequencies) (win32/xbox) */
525
    int    DirectHF;                            /* -10000, 0,     0,    relative direct path level at high frequencies (win32/xbox) */
526
    int    Room;                                /* -10000, 1000,  0,    room effect level (at low and mid frequencies) (win32/xbox) */
527
    int    RoomHF;                              /* -10000, 0,     0,    relative room effect level at high frequencies (win32/xbox) */
528
    int    Obstruction;                         /* -10000, 0,     0,    main obstruction control (attenuation at high frequencies)  (win32/xbox) */
529
    float  ObstructionLFRatio;                  /* 0.0,    1.0,   0.0,  obstruction low-frequency level re. main control (win32/xbox) */
530
    int    Occlusion;                           /* -10000, 0,     0,    main occlusion control (attenuation at high frequencies) (win32/xbox) */
531
    float  OcclusionLFRatio;                    /* 0.0,    1.0,   0.25, occlusion low-frequency level re. main control (win32/xbox) */
532
    float  OcclusionRoomRatio;                  /* 0.0,    10.0,  1.5,  relative occlusion control for room effect (win32) */
533
    float  OcclusionDirectRatio;                /* 0.0,    10.0,  1.0,  relative occlusion control for direct path (win32) */
534
    int    Exclusion;                           /* -10000, 0,     0,    main exlusion control (attenuation at high frequencies) (win32) */
535
    float  ExclusionLFRatio;                    /* 0.0,    1.0,   1.0,  exclusion low-frequency level re. main control (win32) */
536
    int    OutsideVolumeHF;                     /* -10000, 0,     0,    outside sound cone level at high frequencies (win32) */
537
    float  DopplerFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flDopplerFactor but per source (win32) */
538
    float  RolloffFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but per source (win32) */
539
    float  RoomRolloffFactor;                   /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but for room effect (win32/xbox) */
540
    float  AirAbsorptionFactor;                 /* 0.0,    10.0,  1.0,  multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (win32) */
541
    int    Flags;                               /* FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32) */
542
} FSOUND_REVERB_CHANNELPROPERTIES;
543
 
544
 
545
/*
546
[DEFINE_START]
547
[
548
    [NAME]
549
    FSOUND_REVERB_CHANNELFLAGS
550
 
551
    [DESCRIPTION]
552
    Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
553
 
554
    [SEE_ALSO]
555
    FSOUND_REVERB_CHANNELPROPERTIES
556
]
557
*/
558
#define FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO  0x00000001 /* Automatic setting of 'Direct'  due to distance from listener */
559
#define FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO      0x00000002 /* Automatic setting of 'Room'  due to distance from listener */
560
#define FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO    0x00000004 /* Automatic setting of 'RoomHF' due to distance from listener */
561
#define FSOUND_REVERB_CHANNELFLAGS_DEFAULT       (FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO |   \
562
                                                  FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO|        \
563
                                                  FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO)
564
/* [DEFINE_END] */
565
 
566
 
567
/*
568
[ENUM]
569
[
570
    [DESCRIPTION]
571
    These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
572
 
573
    [SEE_ALSO]
574
    FSOUND_FX_Enable
575
    FSOUND_FX_Disable
576
    FSOUND_FX_SetChorus
577
    FSOUND_FX_SetCompressor
578
    FSOUND_FX_SetDistortion
579
    FSOUND_FX_SetEcho
580
    FSOUND_FX_SetFlanger
581
    FSOUND_FX_SetGargle
582
    FSOUND_FX_SetI3DL2Reverb
583
    FSOUND_FX_SetParamEQ
584
    FSOUND_FX_SetWavesReverb
585
]
586
*/
587
enum FSOUND_FX_MODES
588
{
589
    FSOUND_FX_CHORUS,
590
    FSOUND_FX_COMPRESSOR,
591
    FSOUND_FX_DISTORTION,
592
    FSOUND_FX_ECHO,
593
    FSOUND_FX_FLANGER,
594
    FSOUND_FX_GARGLE,
595
    FSOUND_FX_I3DL2REVERB,
596
    FSOUND_FX_PARAMEQ,
597
    FSOUND_FX_WAVES_REVERB,
598
 
599
    FSOUND_FX_MAX
600
};
601
 
602
/*
603
[ENUM]
604
[
605
    [DESCRIPTION]  
606
    These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
607
    Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes.  Other output modes will only
608
    interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
609
 
610
    [SEE_ALSO]
611
    FSOUND_SetSpeakerMode
612
]
613
*/
614
enum FSOUND_SPEAKERMODES
615
{
616
    FSOUND_SPEAKERMODE_DOLBYDIGITAL,  /* The audio is played through a speaker arrangement of surround speakers with a subwoofer. */
617
    FSOUND_SPEAKERMODE_HEADPHONES,    /* The speakers are headphones. */
618
    FSOUND_SPEAKERMODE_MONO,          /* The speakers are monaural. */
619
    FSOUND_SPEAKERMODE_QUAD,          /* The speakers are quadraphonic.  */
620
    FSOUND_SPEAKERMODE_STEREO,        /* The speakers are stereo (default value). */
621
    FSOUND_SPEAKERMODE_SURROUND,      /* The speakers are surround sound. */
622
    FSOUND_SPEAKERMODE_DTS            /* (XBOX Only) The audio is played through a speaker arrangement of surround speakers with a subwoofer. */
623
};
624
 
625
 
626
/*
627
[DEFINE_START]
628
[
629
    [NAME]
630
    FSOUND_INIT_FLAGS
631
 
632
    [DESCRIPTION]  
633
    Initialization flags.  Use them with FSOUND_Init in the flags parameter to change various behaviour.
634
 
635
    FSOUND_INIT_ENABLEOUTPUTFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
636
    Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
637
    This can be fixed with FSOUND_SetBufferSize.  Increase the BufferSize until it works.
638
    When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
639
 
640
    [SEE_ALSO]
641
    FSOUND_Init
642
]
643
*/
644
#define FSOUND_INIT_USEDEFAULTMIDISYNTH     0x01    /* Causes MIDI playback to force software decoding. */
645
#define FSOUND_INIT_GLOBALFOCUS             0x02    /* For DirectSound output - sound is not muted when window is out of focus. */
646
#define FSOUND_INIT_ENABLEOUTPUTFX          0x04    /* For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! */
647
#define FSOUND_INIT_ACCURATEVULEVELS        0x08    /* This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit */
648
#define FSOUND_INIT_DISABLE_CORE0_REVERB    0x10    /* PS2 only - Disable reverb on CORE 0 to regain SRAM */
649
#define FSOUND_INIT_DISABLE_CORE1_REVERB    0x20    /* PS2 only - Disable reverb on CORE 1 to regain SRAM */
650
/* [DEFINE_END] */
651
 
652
 
653
 
654
 
655
/* ========================================================================================== */
656
/* FUNCTION PROTOTYPES                                                                        */
657
/* ========================================================================================== */
658
 
659
#ifdef __cplusplus
660
extern "C" {
661
#endif
662
 
663
/* ================================== */
664
/* Initialization / Global functions. */
665
/* ================================== */
666
 
667
/*
668
    PRE - FSOUND_Init functions. These can't be called after FSOUND_Init is
669
    called (they will fail). They set up FMOD system functionality.
670
*/
671
 
672
DLL_API signed char     F_API FSOUND_SetOutput(int outputtype);
673
DLL_API signed char     F_API FSOUND_SetDriver(int driver);
674
DLL_API signed char     F_API FSOUND_SetMixer(int mixer);
675
DLL_API signed char     F_API FSOUND_SetBufferSize(int len_ms);
676
DLL_API signed char     F_API FSOUND_SetHWND(void *hwnd);
677
DLL_API signed char     F_API FSOUND_SetMinHardwareChannels(int min);
678
DLL_API signed char     F_API FSOUND_SetMaxHardwareChannels(int max);
679
DLL_API signed char     F_API FSOUND_SetMemorySystem(void *pool,
680
                                                     int poollen,
681
                                                     FSOUND_ALLOCCALLBACK   useralloc,
682
                                                     FSOUND_REALLOCCALLBACK userrealloc,
683
                                                     FSOUND_FREECALLBACK    userfree);
684
/*
685
    Main initialization / closedown functions.
686
    Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override
687
           with MIDI playback.
688
         : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter
689
           which window is in focus. (FSOUND_OUTPUT_DSOUND only)
690
*/
691
 
692
DLL_API signed char     F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
693
DLL_API void            F_API FSOUND_Close();
694
 
695
/*
696
    Runtime system level functions
697
*/
698
 
699
DLL_API void            F_API FSOUND_SetSpeakerMode(unsigned int speakermode);
700
DLL_API void            F_API FSOUND_SetSFXMasterVolume(int volume);
701
DLL_API void            F_API FSOUND_SetPanSeperation(float pansep);
702
DLL_API void            F_API FSOUND_File_SetCallbacks(FSOUND_OPENCALLBACK  useropen,
703
                                                       FSOUND_CLOSECALLBACK userclose,
704
                                                       FSOUND_READCALLBACK  userread,
705
                                                       FSOUND_SEEKCALLBACK  userseek,
706
                                                       FSOUND_TELLCALLBACK  usertell);
707
 
708
/*
709
    System information functions.
710
*/
711
 
712
DLL_API int             F_API FSOUND_GetError();
713
DLL_API float           F_API FSOUND_GetVersion();
714
DLL_API int             F_API FSOUND_GetOutput();
715
DLL_API void *          F_API FSOUND_GetOutputHandle();
716
DLL_API int             F_API FSOUND_GetDriver();
717
DLL_API int             F_API FSOUND_GetMixer();
718
DLL_API int             F_API FSOUND_GetNumDrivers();
719
DLL_API signed char *   F_API FSOUND_GetDriverName(int id);
720
DLL_API signed char     F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
721
DLL_API int             F_API FSOUND_GetOutputRate();
722
DLL_API int             F_API FSOUND_GetMaxChannels();
723
DLL_API int             F_API FSOUND_GetMaxSamples();
724
DLL_API int             F_API FSOUND_GetSFXMasterVolume();
725
DLL_API int             F_API FSOUND_GetNumHardwareChannels();
726
DLL_API int             F_API FSOUND_GetChannelsPlaying();
727
DLL_API float           F_API FSOUND_GetCPUUsage();
728
DLL_API void            F_API FSOUND_GetMemoryStats(unsigned int *currentalloced, unsigned int *maxalloced);
729
 
730
/* =================================== */
731
/* Sample management / load functions. */
732
/* =================================== */
733
 
734
/*
735
    Sample creation and management functions
736
    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Sample_Load to load from memory.
737
           Use FSOUND_LOADRAW      flag with FSOUND_Sample_Load to treat as as raw pcm data.
738
*/
739
 
740
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int memlength);
741
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
742
DLL_API void            F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
743
DLL_API signed char     F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
744
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);
745
DLL_API signed char     F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
746
 
747
/*
748
    Sample control functions
749
*/
750
 
751
DLL_API signed char     F_API FSOUND_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode);
752
DLL_API signed char     F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend);
753
DLL_API signed char     F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri);
754
DLL_API signed char     F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max);
755
DLL_API signed char     F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr, int max);
756
 
757
/*
758
    Sample information functions
759
*/
760
 
761
DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
762
DLL_API char *          F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
763
DLL_API unsigned int    F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
764
DLL_API signed char     F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
765
DLL_API signed char     F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
766
DLL_API unsigned int    F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr);
767
 
768
/* ============================ */
769
/* Channel control functions.   */
770
/* ============================ */
771
 
772
/*
773
    Playing and stopping sounds.  
774
    Note : Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
775
           Use FSOUND_ALL as the 'channel' variable to control ALL channels with one function call!
776
*/
777
 
778
DLL_API int             F_API FSOUND_PlaySound(int channel, FSOUND_SAMPLE *sptr);
779
DLL_API int             F_API FSOUND_PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused);
780
DLL_API signed char     F_API FSOUND_StopSound(int channel);
781
 
782
/*
783
    Functions to control playback of a channel.
784
    Note : FSOUND_ALL can be used on most of these functions as a channel value.
785
*/
786
 
787
DLL_API signed char     F_API FSOUND_SetFrequency(int channel, int freq);
788
DLL_API signed char     F_API FSOUND_SetVolume(int channel, int vol);
789
DLL_API signed char     F_API FSOUND_SetVolumeAbsolute(int channel, int vol);
790
DLL_API signed char     F_API FSOUND_SetPan(int channel, int pan);
791
DLL_API signed char     F_API FSOUND_SetSurround(int channel, signed char surround);
792
DLL_API signed char     F_API FSOUND_SetMute(int channel, signed char mute);
793
DLL_API signed char     F_API FSOUND_SetPriority(int channel, int priority);
794
DLL_API signed char     F_API FSOUND_SetReserved(int channel, signed char reserved);
795
DLL_API signed char     F_API FSOUND_SetPaused(int channel, signed char paused);
796
DLL_API signed char     F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode);
797
DLL_API signed char     F_API FSOUND_SetCurrentPosition(int channel, unsigned int offset);
798
 
799
/*
800
    Channel information functions.
801
*/
802
 
803
DLL_API signed char     F_API FSOUND_IsPlaying(int channel);
804
DLL_API int             F_API FSOUND_GetFrequency(int channel);
805
DLL_API int             F_API FSOUND_GetVolume(int channel);
806
DLL_API int             F_API FSOUND_GetPan(int channel);
807
DLL_API signed char     F_API FSOUND_GetSurround(int channel);
808
DLL_API signed char     F_API FSOUND_GetMute(int channel);
809
DLL_API int             F_API FSOUND_GetPriority(int channel);
810
DLL_API signed char     F_API FSOUND_GetReserved(int channel);
811
DLL_API signed char     F_API FSOUND_GetPaused(int channel);
812
DLL_API unsigned int    F_API FSOUND_GetLoopMode(int channel);
813
DLL_API unsigned int    F_API FSOUND_GetCurrentPosition(int channel);
814
DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel);
815
DLL_API signed char     F_API FSOUND_GetCurrentLevels(int channel, float *l, float *r);
816
 
817
 
818
/* =================== */
819
/* FX functions.       */
820
/* =================== */
821
 
822
/*
823
    Functions to control DX8 only effects processing.
824
 
825
    - FX enabled samples can only be played once at a time, not multiple times at once.
826
    - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
827
    - FSOUND_INIT_ENABLEOUTPUTFX can be used to apply hardware effect processing to the
828
      global mixed output of FMOD's software channels.
829
    - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
830
    - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
831
      it will return a unique handle for each FX.
832
    - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
833
    - FSOUND_FX_Disable must be called to reset/clear the FX from a channel.
834
*/
835
 
836
DLL_API int             F_API FSOUND_FX_Enable(int channel, unsigned int fx);    /* See FSOUND_FX_MODES */
837
DLL_API signed char     F_API FSOUND_FX_Disable(int channel);    
838
 
839
DLL_API signed char     F_API FSOUND_FX_SetChorus(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
840
DLL_API signed char     F_API FSOUND_FX_SetCompressor(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay);
841
DLL_API signed char     F_API FSOUND_FX_SetDistortion(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff);
842
DLL_API signed char     F_API FSOUND_FX_SetEcho(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay);
843
DLL_API signed char     F_API FSOUND_FX_SetFlanger(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
844
DLL_API signed char     F_API FSOUND_FX_SetGargle(int fxid, int RateHz, int WaveShape);
845
DLL_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);
846
DLL_API signed char     F_API FSOUND_FX_SetParamEQ(int fxid, float Center, float Bandwidth, float Gain);
847
DLL_API signed char     F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio);  
848
 
849
/* =================== */
850
/* 3D sound functions. */
851
/* =================== */
852
 
853
/*
854
    See also FSOUND_Sample_SetMinMaxDistance (above)
855
*/
856
 
857
DLL_API void            F_API FSOUND_3D_Update();   /* you must call this once a frame */
858
DLL_API signed char     F_API FSOUND_3D_SetAttributes(int channel, float *pos, float *vel);
859
DLL_API signed char     F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel);
860
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);
861
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);
862
DLL_API void            F_API FSOUND_3D_Listener_SetDopplerFactor(float scale);
863
DLL_API void            F_API FSOUND_3D_Listener_SetDistanceFactor(float scale);
864
DLL_API void            F_API FSOUND_3D_Listener_SetRolloffFactor(float scale);
865
 
866
/* ========================= */
867
/* File Streaming functions. */
868
/* ========================= */
869
 
870
/*
871
    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Stream_OpenFile to stream from memory.
872
           Use FSOUND_LOADRAW      flag with FSOUND_Stream_OpenFile to treat stream as raw pcm data.
873
           Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_OpenFile to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
874
           Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
875
*/
876
 
877
DLL_API signed char     F_API FSOUND_Stream_SetBufferSize(int ms);      /* call this before opening streams, not after */
878
 
879
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_OpenFile(const char *filename, unsigned int mode, int memlength);
880
DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata);
881
DLL_API int             F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream);
882
DLL_API int             F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused);
883
 
884
DLL_API signed char     F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream);
885
DLL_API signed char     F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
886
DLL_API signed char     F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
887
DLL_API signed char     F_API FSOUND_Stream_SetSynchCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
888
DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream);   /* every stream contains a sample to playback on */
889
DLL_API FSOUND_DSPUNIT *F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param);
890
 
891
DLL_API signed char     F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, unsigned int position);
892
DLL_API unsigned int    F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream);
893
DLL_API signed char     F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms);
894
DLL_API int             F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream);
895
DLL_API int             F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream);
896
DLL_API int             F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream);
897
 
898
/* =================== */
899
/* CD audio functions. */
900
/* =================== */
901
 
902
/*
903
    Note : 0 = default cdrom.  Otherwise specify the drive letter, for example. 'D'.
904
*/
905
 
906
DLL_API signed char     F_API FSOUND_CD_Play(char drive, int track);
907
DLL_API void            F_API FSOUND_CD_SetPlayMode(char drive, signed char mode);
908
DLL_API signed char     F_API FSOUND_CD_Stop(char drive);
909
DLL_API signed char     F_API FSOUND_CD_SetPaused(char drive, signed char paused);
910
DLL_API signed char     F_API FSOUND_CD_SetVolume(char drive, int volume);
911
DLL_API signed char     F_API FSOUND_CD_Eject(char drive);
912
 
913
DLL_API signed char     F_API FSOUND_CD_GetPaused(char drive);
914
DLL_API int             F_API FSOUND_CD_GetTrack(char drive);
915
DLL_API int             F_API FSOUND_CD_GetNumTracks(char drive);
916
DLL_API int             F_API FSOUND_CD_GetVolume(char drive);
917
DLL_API int             F_API FSOUND_CD_GetTrackLength(char drive, int track);
918
DLL_API int             F_API FSOUND_CD_GetTrackTime(char drive);
919
 
920
/* ============== */
921
/* DSP functions. */
922
/* ============== */
923
 
924
/*
925
    DSP Unit control and information functions.
926
    These functions allow you access to the mixed stream that FMOD uses to play back sound on.
927
*/
928
 
929
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, int param);
930
DLL_API void            F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit);
931
DLL_API void            F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority);
932
DLL_API int             F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit);
933
DLL_API void            F_API FSOUND_DSP_SetActive(FSOUND_DSPUNIT *unit, signed char active);
934
DLL_API signed char     F_API FSOUND_DSP_GetActive(FSOUND_DSPUNIT *unit);
935
 
936
/*
937
    Functions to get hold of FSOUND 'system DSP unit' handles.
938
*/
939
 
940
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClearUnit();
941
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetSFXUnit();
942
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetMusicUnit();
943
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetFFTUnit();
944
DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClipAndCopyUnit();
945
 
946
/*
947
    Miscellaneous DSP functions
948
    Note for the spectrum analysis function to work, you have to enable the FFT DSP unit with
949
    the following code FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);
950
    It is off by default to save cpu usage.
951
*/
952
 
953
DLL_API signed char     F_API FSOUND_DSP_MixBuffers(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode);
954
DLL_API void            F_API FSOUND_DSP_ClearMixBuffer();
955
DLL_API int             F_API FSOUND_DSP_GetBufferLength();      /* Length of each DSP update */
956
DLL_API int             F_API FSOUND_DSP_GetBufferLengthTotal(); /* Total buffer length due to FSOUND_SetBufferSize */
957
DLL_API float *         F_API FSOUND_DSP_GetSpectrum();          /* Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. */
958
 
959
/* ========================================================================== */
960
/* Reverb functions. (eax2/eax3 reverb)  (NOT SUPPORTED IN LINUX/CE)          */
961
/* ========================================================================== */
962
 
963
/*
964
    See top of file for definitions and information on the reverb parameters.
965
*/
966
 
967
DLL_API signed char F_API FSOUND_Reverb_SetProperties(FSOUND_REVERB_PROPERTIES *prop);
968
DLL_API signed char F_API FSOUND_Reverb_GetProperties(FSOUND_REVERB_PROPERTIES *prop);
969
DLL_API signed char F_API FSOUND_Reverb_SetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop);
970
DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop);
971
 
972
/* ================================================ */
973
/* Recording functions  (NOT SUPPORTED IN LINUX/MAC) */
974
/* ================================================ */
975
 
976
/*
977
    Recording initialization functions
978
*/
979
 
980
DLL_API signed char     F_API FSOUND_Record_SetDriver(int outputtype);
981
DLL_API int             F_API FSOUND_Record_GetNumDrivers();
982
DLL_API signed char *   F_API FSOUND_Record_GetDriverName(int id);
983
DLL_API int             F_API FSOUND_Record_GetDriver();
984
 
985
/*
986
    Recording functionality.  Only one recording session will work at a time.
987
*/
988
 
989
DLL_API signed char     F_API FSOUND_Record_StartSample(FSOUND_SAMPLE *sptr, signed char loop);
990
DLL_API signed char     F_API FSOUND_Record_Stop();
991
DLL_API int             F_API FSOUND_Record_GetPosition();  
992
 
993
/* ========================================================================================== */
994
/* FMUSIC API (MOD,S3M,XM,IT,MIDI PLAYBACK)                                                   */
995
/* ========================================================================================== */
996
 
997
/*
998
    Song management / playback functions.
999
*/
1000
 
1001
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
1002
DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongMemory(void *data, int length);
1003
DLL_API signed char     F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
1004
DLL_API signed char     F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
1005
DLL_API signed char     F_API FMUSIC_StopSong(FMUSIC_MODULE *mod);
1006
DLL_API void            F_API FMUSIC_StopAllSongs();
1007
 
1008
DLL_API signed char     F_API FMUSIC_SetZxxCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback);
1009
DLL_API signed char     F_API FMUSIC_SetRowCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep);
1010
DLL_API signed char     F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep);
1011
DLL_API signed char     F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument);
1012
 
1013
DLL_API signed char     F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr);
1014
DLL_API signed char     F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume);
1015
 
1016
/*
1017
    Runtime song functions.
1018
*/
1019
 
1020
DLL_API signed char     F_API FMUSIC_SetReverb(signed char reverb);             /* MIDI only */
1021
DLL_API signed char     F_API FMUSIC_SetLooping(FMUSIC_MODULE *mod, signed char looping);
1022
DLL_API signed char     F_API FMUSIC_SetOrder(FMUSIC_MODULE *mod, int order);
1023
DLL_API signed char     F_API FMUSIC_SetPaused(FMUSIC_MODULE *mod, signed char pause);
1024
DLL_API signed char     F_API FMUSIC_SetMasterVolume(FMUSIC_MODULE *mod, int volume);
1025
DLL_API signed char     F_API FMUSIC_SetMasterSpeed(FMUSIC_MODULE *mode, float speed);
1026
DLL_API signed char     F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float pansep);
1027
 
1028
/*
1029
    Static song information functions.
1030
*/
1031
 
1032
DLL_API char *          F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
1033
DLL_API int             F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
1034
DLL_API int             F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
1035
DLL_API int             F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
1036
DLL_API int             F_API FMUSIC_GetNumInstruments(FMUSIC_MODULE *mod);
1037
DLL_API int             F_API FMUSIC_GetNumSamples(FMUSIC_MODULE *mod);
1038
DLL_API int             F_API FMUSIC_GetNumChannels(FMUSIC_MODULE *mod);
1039
DLL_API FSOUND_SAMPLE * F_API FMUSIC_GetSample(FMUSIC_MODULE *mod, int sampno);
1040
DLL_API int             F_API FMUSIC_GetPatternLength(FMUSIC_MODULE *mod, int orderno);
1041
 
1042
/*
1043
    Runtime song information.
1044
*/
1045
 
1046
DLL_API signed char     F_API FMUSIC_IsFinished(FMUSIC_MODULE *mod);
1047
DLL_API signed char     F_API FMUSIC_IsPlaying(FMUSIC_MODULE *mod);
1048
DLL_API int             F_API FMUSIC_GetMasterVolume(FMUSIC_MODULE *mod);
1049
DLL_API int             F_API FMUSIC_GetGlobalVolume(FMUSIC_MODULE *mod);
1050
DLL_API int             F_API FMUSIC_GetOrder(FMUSIC_MODULE *mod);
1051
DLL_API int             F_API FMUSIC_GetPattern(FMUSIC_MODULE *mod);
1052
DLL_API int             F_API FMUSIC_GetSpeed(FMUSIC_MODULE *mod);
1053
DLL_API int             F_API FMUSIC_GetBPM(FMUSIC_MODULE *mod);
1054
DLL_API int             F_API FMUSIC_GetRow(FMUSIC_MODULE *mod);
1055
DLL_API signed char     F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod);
1056
DLL_API int             F_API FMUSIC_GetTime(FMUSIC_MODULE *mod);
1057
DLL_API int             F_API FMUSIC_GetRealChannel(FMUSIC_MODULE *mod, int modchannel);
1058
 
1059
#ifdef __cplusplus
1060
}
1061
#endif
1062
 
1063
#endif