root / branches / test / CCV_Select_Camera / libs / fmodex / include / fmod.h @ 12

View | Annotate | Download (163.6 KB)

1
/*$ preserve start $*/
2
3
/* ============================================================================================ */
4
/* FMOD Ex - Main C/C++ header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2009. */
5
/*                                                                                              */
6
/* This header is the base header for all other FMOD headers.  If you are programming in C      */
7
/* use this exclusively, or if you are programming C++ use this in conjunction with FMOD.HPP    */
8
/*                                                                                              */
9
/* ============================================================================================ */
10
11
#ifndef _FMOD_H
12
#define _FMOD_H
13
14
/*
15
    FMOD version number.  Check this against FMOD::System::getVersion.
16
    0xaaaabbcc -> aaaa = major version number.  bb = minor version number.  cc = development version number.
17
*/
18
19
#define FMOD_VERSION    0x00042200
20
21
/*
22
    Compiler specific settings.
23
*/
24
25
#if defined(__CYGWIN32__)
26
    #define F_CDECL __cdecl
27
    #define F_STDCALL __stdcall
28
    #define F_DECLSPEC __declspec
29
    #define F_DLLEXPORT ( dllexport )
30
#elif (defined(WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(_XBOX))
31
    #define F_CDECL _cdecl
32
    #define F_STDCALL _stdcall
33
    #define F_DECLSPEC __declspec
34
    #define F_DLLEXPORT ( dllexport )
35
#elif defined(__MACH__)
36
    #define F_CDECL
37
    #define F_STDCALL
38
    #define F_DECLSPEC
39
    #define F_DLLEXPORT __attribute__ ((visibility("default")))
40
#else
41
    #define F_STDCALL
42
    #define F_CDECL
43
    #define F_DECLSPEC
44
    #define F_DLLEXPORT
45
#endif
46
47
#ifdef DLL_EXPORTS
48
    #if defined(__MACH__)
49
        #define F_API __attribute__ ((visibility("default")))
50
    #else
51
        #define F_API __declspec(dllexport) F_STDCALL
52
    #endif
53
#else
54
    #define F_API F_STDCALL
55
#endif
56
57
#define F_CALLBACK F_STDCALL
58
59
/*
60
    FMOD types.
61
*/
62
63
typedef int                       FMOD_BOOL;
64
typedef struct FMOD_SYSTEM        FMOD_SYSTEM;
65
typedef struct FMOD_SOUND         FMOD_SOUND;
66
typedef struct FMOD_CHANNEL       FMOD_CHANNEL;
67
typedef struct FMOD_CHANNELGROUP  FMOD_CHANNELGROUP;
68
typedef struct FMOD_SOUNDGROUP    FMOD_SOUNDGROUP;
69
typedef struct FMOD_REVERB        FMOD_REVERB;
70
typedef struct FMOD_DSP           FMOD_DSP;
71
typedef struct FMOD_DSPCONNECTION FMOD_DSPCONNECTION;
72
typedef struct FMOD_POLYGON                  FMOD_POLYGON;
73
typedef struct FMOD_GEOMETRY          FMOD_GEOMETRY;
74
typedef struct FMOD_SYNCPOINT          FMOD_SYNCPOINT;
75
typedef unsigned int              FMOD_MODE;
76
typedef unsigned int              FMOD_TIMEUNIT;
77
typedef unsigned int              FMOD_INITFLAGS;
78
typedef unsigned int              FMOD_CAPS;
79
typedef unsigned int              FMOD_DEBUGLEVEL;
80
typedef unsigned int              FMOD_MEMORY_TYPE;
81
82
/*
83
[STRUCTURE] 
84
[
85
    [DESCRIPTION]   
86
    Structure describing a point in 3D space.
87
88
    [REMARKS]
89
    FMOD uses a left handed co-ordinate system by default.<br>
90
    To use a right handed co-ordinate system specify FMOD_INIT_3D_RIGHTHANDED from FMOD_INITFLAGS in System::init.
91
92
    [PLATFORMS]
93
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
94
95
    [SEE_ALSO]      
96
    System::set3DListenerAttributes
97
    System::get3DListenerAttributes
98
    Channel::set3DAttributes
99
    Channel::get3DAttributes
100
    Channel::set3DCustomRolloff
101
    Channel::get3DCustomRolloff
102
    Sound::set3DCustomRolloff
103
    Sound::get3DCustomRolloff
104
    Geometry::addPolygon
105
    Geometry::setPolygonVertex
106
    Geometry::getPolygonVertex
107
    Geometry::setRotation
108
    Geometry::getRotation
109
    Geometry::setPosition
110
    Geometry::getPosition
111
    Geometry::setScale
112
    Geometry::getScale
113
    FMOD_INITFLAGS
114
]
115
*/
116
typedef struct
117
{
118
        float x;        /* X co-ordinate in 3D space. */
119
    float y;        /* Y co-ordinate in 3D space. */
120
    float z;        /* Z co-ordinate in 3D space. */
121
} FMOD_VECTOR;
122
123
/*
124
[STRUCTURE] 
125
[
126
    [DESCRIPTION]   
127
    Structure describing a globally unique identifier.
128
129
    [REMARKS]
130
131
    [PLATFORMS]
132
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
133
134
    [SEE_ALSO]      
135
    System::getDriverInfo
136
]
137
*/
138
typedef struct
139
{
140
    unsigned int   Data1;       /* Specifies the first 8 hexadecimal digits of the GUID */
141
    unsigned short Data2;       /* Specifies the first group of 4 hexadecimal digits.   */
142
    unsigned short Data3;       /* Specifies the second group of 4 hexadecimal digits.  */
143
    unsigned char  Data4[8];    /* Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits. */
144
} FMOD_GUID;
145
146
147
/*$ fmod result start $*/
148
/*
149
[ENUM]
150
[
151
    [DESCRIPTION]   
152
    error codes.  Returned from every function.
153
154
    [REMARKS]
155
156
    [PLATFORMS]
157
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
158
159
    [SEE_ALSO]      
160
]
161
*/
162
typedef enum
163
{
164
    FMOD_OK,                        /* No errors. */
165
    FMOD_ERR_ALREADYLOCKED,         /* Tried to call lock a second time before unlock was called. */
166
    FMOD_ERR_BADCOMMAND,            /* Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). */
167
    FMOD_ERR_CDDA_DRIVERS,          /* Neither NTSCSI nor ASPI could be initialised. */
168
    FMOD_ERR_CDDA_INIT,             /* An error occurred while initialising the CDDA subsystem. */
169
    FMOD_ERR_CDDA_INVALID_DEVICE,   /* Couldn't find the specified device. */
170
    FMOD_ERR_CDDA_NOAUDIO,          /* No audio tracks on the specified disc. */
171
    FMOD_ERR_CDDA_NODEVICES,        /* No CD/DVD devices were found. */ 
172
    FMOD_ERR_CDDA_NODISC,           /* No disc present in the specified drive. */
173
    FMOD_ERR_CDDA_READ,             /* A CDDA read error occurred. */
174
    FMOD_ERR_CHANNEL_ALLOC,         /* Error trying to allocate a channel. */
175
    FMOD_ERR_CHANNEL_STOLEN,        /* The specified channel has been reused to play another sound. */
176
    FMOD_ERR_COM,                   /* A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. */
177
    FMOD_ERR_DMA,                   /* DMA Failure.  See debug output for more information. */
178
    FMOD_ERR_DSP_CONNECTION,        /* DSP connection error.  Connection possibly caused a cyclic dependancy.  Or tried to connect a tree too many units deep (more than 128). */
179
    FMOD_ERR_DSP_FORMAT,            /* DSP Format error.  A DSP unit may have attempted to connect to this network with the wrong format. */
180
    FMOD_ERR_DSP_NOTFOUND,          /* DSP connection error.  Couldn't find the DSP unit specified. */
181
    FMOD_ERR_DSP_RUNNING,           /* DSP error.  Cannot perform this operation while the network is in the middle of running.  This will most likely happen if a connection or disconnection is attempted in a DSP callback. */
182
    FMOD_ERR_DSP_TOOMANYCONNECTIONS,/* DSP connection error.  The unit being connected to or disconnected should only have 1 input or output. */
183
    FMOD_ERR_FILE_BAD,              /* Error loading file. */
184
    FMOD_ERR_FILE_COULDNOTSEEK,     /* Couldn't perform seek operation.  This is a limitation of the medium (ie netstreams) or the file format. */
185
    FMOD_ERR_FILE_DISKEJECTED,      /* Media was ejected while reading. */
186
    FMOD_ERR_FILE_EOF,              /* End of file unexpectedly reached while trying to read essential data (truncated data?). */
187
    FMOD_ERR_FILE_NOTFOUND,         /* File not found. */
188
    FMOD_ERR_FILE_UNWANTED,         /* Unwanted file access occured. */
189
    FMOD_ERR_FORMAT,                /* Unsupported file or audio format. */
190
    FMOD_ERR_HTTP,                  /* A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. */
191
    FMOD_ERR_HTTP_ACCESS,           /* The specified resource requires authentication or is forbidden. */
192
    FMOD_ERR_HTTP_PROXY_AUTH,       /* Proxy authentication is required to access the specified resource. */
193
    FMOD_ERR_HTTP_SERVER_ERROR,     /* A HTTP server error occurred. */
194
    FMOD_ERR_HTTP_TIMEOUT,          /* The HTTP request timed out. */
195
    FMOD_ERR_INITIALIZATION,        /* FMOD was not initialized correctly to support this function. */
196
    FMOD_ERR_INITIALIZED,           /* Cannot call this command after System::init. */
197
    FMOD_ERR_INTERNAL,              /* An error occured that wasn't supposed to.  Contact support. */
198
    FMOD_ERR_INVALID_ADDRESS,       /* On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) */
199
    FMOD_ERR_INVALID_FLOAT,         /* Value passed in was a NaN, Inf or denormalized float. */
200
    FMOD_ERR_INVALID_HANDLE,        /* An invalid object handle was used. */
201
    FMOD_ERR_INVALID_PARAM,         /* An invalid parameter was passed to this function. */
202
    FMOD_ERR_INVALID_SPEAKER,       /* An invalid speaker was passed to this function based on the current speaker mode. */
203
    FMOD_ERR_INVALID_SYNCPOINT,     /* The syncpoint did not come from this sound handle. */
204
    FMOD_ERR_INVALID_VECTOR,        /* The vectors passed in are not unit length, or perpendicular. */
205
    FMOD_ERR_IRX,                   /* PS2 only.  fmodex.irx failed to initialize.  This is most likely because you forgot to load it. */
206
    FMOD_ERR_MAXAUDIBLE,            /* Reached maximum audible playback count for this sound's soundgroup. */
207
    FMOD_ERR_MEMORY,                /* Not enough memory or resources. */
208
    FMOD_ERR_MEMORY_CANTPOINT,      /* Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. */
209
    FMOD_ERR_MEMORY_IOP,            /* PS2 only.  Not enough memory or resources on PlayStation 2 IOP ram. */
210
    FMOD_ERR_MEMORY_SRAM,           /* Not enough memory or resources on console sound ram. */
211
    FMOD_ERR_NEEDS2D,               /* Tried to call a command on a 3d sound when the command was meant for 2d sound. */
212
    FMOD_ERR_NEEDS3D,               /* Tried to call a command on a 2d sound when the command was meant for 3d sound. */
213
    FMOD_ERR_NEEDSHARDWARE,         /* Tried to use a feature that requires hardware support.  (ie trying to play a VAG compressed sound in software on PS2). */
214
    FMOD_ERR_NEEDSSOFTWARE,         /* Tried to use a feature that requires the software engine.  Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. */
215
    FMOD_ERR_NET_CONNECT,           /* Couldn't connect to the specified host. */
216
    FMOD_ERR_NET_SOCKET_ERROR,      /* A socket error occurred.  This is a catch-all for socket-related errors not listed elsewhere. */
217
    FMOD_ERR_NET_URL,               /* The specified URL couldn't be resolved. */
218
    FMOD_ERR_NET_WOULD_BLOCK,       /* Operation on a non-blocking socket could not complete immediately. */
219
    FMOD_ERR_NOTREADY,              /* Operation could not be performed because specified sound is not ready. */
220
    FMOD_ERR_OUTPUT_ALLOCATED,      /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
221
    FMOD_ERR_OUTPUT_CREATEBUFFER,   /* Error creating hardware sound buffer. */
222
    FMOD_ERR_OUTPUT_DRIVERCALL,     /* A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. */
223
    FMOD_ERR_OUTPUT_ENUMERATION,    /* Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal. */
224
    FMOD_ERR_OUTPUT_FORMAT,         /* Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). */
225
    FMOD_ERR_OUTPUT_INIT,           /* Error initializing output device. */
226
    FMOD_ERR_OUTPUT_NOHARDWARE,     /* FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play it. */
227
    FMOD_ERR_OUTPUT_NOSOFTWARE,     /* Attempted to create a software sound but no software channels were specified in System::init. */
228
    FMOD_ERR_PAN,                   /* Panning only works with mono or stereo sound sources. */
229
    FMOD_ERR_PLUGIN,                /* An unspecified error has been returned from a 3rd party plugin. */
230
    FMOD_ERR_PLUGIN_INSTANCES,      /* The number of allowed instances of a plugin has been exceeded. */
231
    FMOD_ERR_PLUGIN_MISSING,        /* A requested output, dsp unit type or codec was not available. */
232
    FMOD_ERR_PLUGIN_RESOURCE,       /* A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) */
233
    FMOD_ERR_RECORD,                /* An error occured trying to initialize the recording device. */
234
    FMOD_ERR_REVERB_INSTANCE,       /* Specified Instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number, or another application has locked the EAX4 FX slot. */
235
    FMOD_ERR_SUBSOUND_ALLOCATED,    /* This subsound is already being used by another sound, you cannot have more than one parent to a sound.  Null out the other parent's entry first. */
236
    FMOD_ERR_SUBSOUND_CANTMOVE,     /* Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. */
237
    FMOD_ERR_SUBSOUND_MODE,         /* The subsound's mode bits do not match with the parent sound's mode bits.  See documentation for function that it was called with. */
238
    FMOD_ERR_SUBSOUNDS,             /* The error occured because the sound referenced contains subsounds.  The operation cannot be performed on a parent sound, or a parent sound was played without setting up a sentence first. */
239
    FMOD_ERR_TAGNOTFOUND,           /* The specified tag could not be found or there are no tags. */
240
    FMOD_ERR_TOOMANYCHANNELS,       /* The sound created exceeds the allowable input channel count.  This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. */
241
    FMOD_ERR_UNIMPLEMENTED,         /* Something in FMOD hasn't been implemented when it should be! contact support! */
242
    FMOD_ERR_UNINITIALIZED,         /* This command failed because System::init or System::setDriver was not called. */
243
    FMOD_ERR_UNSUPPORTED,           /* A command issued was not supported by this object.  Possibly a plugin without certain callbacks specified. */
244
    FMOD_ERR_UPDATE,                /* An error caused by System::update occured. */
245
    FMOD_ERR_VERSION,               /* The version number of this file format is not supported. */
246
247
    FMOD_ERR_EVENT_FAILED,          /* An Event failed to be retrieved, most likely due to 'just fail' being specified as the max playbacks behavior. */
248
    FMOD_ERR_EVENT_INFOONLY,        /* Can't execute this command on an EVENT_INFOONLY event. */
249
    FMOD_ERR_EVENT_INTERNAL,        /* An error occured that wasn't supposed to.  See debug log for reason. */
250
    FMOD_ERR_EVENT_MAXSTREAMS,      /* Event failed because 'Max streams' was hit when FMOD_INIT_FAIL_ON_MAXSTREAMS was specified. */
251
    FMOD_ERR_EVENT_MISMATCH,        /* FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be created with was different, or the FEV was built for a different platform. */
252
    FMOD_ERR_EVENT_NAMECONFLICT,    /* A category with the same name already exists. */
253
    FMOD_ERR_EVENT_NOTFOUND,        /* The requested event, event group, event category or event property could not be found. */
254
    FMOD_ERR_EVENT_NEEDSSIMPLE,     /* Tried to call a function on a complex event that's only supported by simple events. */
255
256
    FMOD_ERR_MUSIC_UNINITIALIZED,   /* Music system is not initialized probably because no music data is loaded. */
257
258
    FMOD_RESULT_FORCEINT = 65536    /* Makes sure this enum is signed 32bit. */
259
} FMOD_RESULT;
260
/*$ fmod result end $*/
261
262
263
/*
264
[ENUM]
265
[
266
    [DESCRIPTION]   
267
    These output types are used with System::setOutput / System::getOutput, to choose which output method to use.
268
  
269
    [REMARKS]
270
    To pass information to the driver when initializing fmod use the extradriverdata parameter in System::init for the following reasons.<br>
271
    <li>FMOD_OUTPUTTYPE_WAVWRITER - extradriverdata is a pointer to a char * filename that the wav writer will output to.
272
    <li>FMOD_OUTPUTTYPE_WAVWRITER_NRT - extradriverdata is a pointer to a char * filename that the wav writer will output to.
273
    <li>FMOD_OUTPUTTYPE_DSOUND - extradriverdata is a pointer to a HWND so that FMOD can set the focus on the audio for a particular window.
274
    <li>FMOD_OUTPUTTYPE_PS2 - extradriverdata is a pointer to a FMOD_PS2_EXTRADRIVERDATA struct. This can be found in fmodps2.h.
275
    <li>FMOD_OUTPUTTYPE_PS3 - extradriverdata is a pointer to a FMOD_PS3_EXTRADRIVERDATA struct. This can be found in fmodps3.h.
276
    <li>FMOD_OUTPUTTYPE_GC - extradriverdata is a pointer to a FMOD_GC_INFO struct. This can be found in fmodgc.h.
277
    <li>FMOD_OUTPUTTYPE_WII - extradriverdata is a pointer to a FMOD_WII_INFO struct. This can be found in fmodwii.h.
278
    <li>FMOD_OUTPUTTYPE_ALSA - extradriverdata is a pointer to a FMOD_LINUX_EXTRADRIVERDATA struct. This can be found in fmodlinux.h.<br>
279
    <br>
280
    Currently these are the only FMOD drivers that take extra information.  Other unknown plugins may have different requirements.
281
    <br><br>
282
    Note! If FMOD_OUTPUTTYPE_WAVWRITER_NRT or FMOD_OUTPUTTYPE_NOSOUND_NRT are used, and if the System::update function is being called
283
    very quickly (ie for a non realtime decode) it may be being called too quickly for the FMOD streamer thread to respond to.  
284
    The result will be a skipping/stuttering output in the captured audio.<br>
285
    <br>
286
    To remedy this, disable the FMOD Ex streamer thread, and use FMOD_INIT_STREAM_FROM_UPDATE to avoid skipping in the output stream,
287
    as it will lock the mixer and the streamer together in the same thread.
288
289
    [PLATFORMS]
290
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
291
292
    [SEE_ALSO]      
293
    System::setOutput
294
    System::getOutput
295
    System::setSoftwareFormat
296
    System::getSoftwareFormat
297
    System::init
298
    System::update
299
    FMOD_INITFLAGS
300
]
301
*/
302
typedef enum
303
{
304
    FMOD_OUTPUTTYPE_AUTODETECT,      /* Picks the best output mode for the platform.  This is the default. */
305
                                     
306
    FMOD_OUTPUTTYPE_UNKNOWN,         /* All                   - 3rd party plugin, unknown.  This is for use with System::getOutput only. */
307
    FMOD_OUTPUTTYPE_NOSOUND,         /* All                   - All calls in this mode succeed but make no sound. */
308
    FMOD_OUTPUTTYPE_WAVWRITER,       /* All                   - Writes output to fmodoutput.wav by default.  Use the 'extradriverdata' parameter in System::init, by simply passing the filename as a string, to set the wav filename. */
309
    FMOD_OUTPUTTYPE_NOSOUND_NRT,     /* All                   - Non-realtime version of FMOD_OUTPUTTYPE_NOSOUND.  User can drive mixer with System::update at whatever rate they want. */
310
    FMOD_OUTPUTTYPE_WAVWRITER_NRT,   /* All                   - Non-realtime version of FMOD_OUTPUTTYPE_WAVWRITER.  User can drive mixer with System::update at whatever rate they want. */
311
                                     
312
    FMOD_OUTPUTTYPE_DSOUND,          /* Win32/Win64           - DirectSound output.  Use this to get hardware accelerated 3d audio and EAX Reverb support. (Default on Windows) */
313
    FMOD_OUTPUTTYPE_WINMM,           /* Win32/Win64           - Windows Multimedia output. */
314
    FMOD_OUTPUTTYPE_OPENAL,          /* Win32/Win64           - OpenAL 1.1 output. Use this for lower CPU overhead than FMOD_OUTPUTTYPE_DSOUND, and also Vista H/W support with Creative Labs cards. */
315
    FMOD_OUTPUTTYPE_WASAPI,          /* Win32                 - Windows Audio Session API. (Default on Windows Vista) */
316
    FMOD_OUTPUTTYPE_ASIO,            /* Win32                 - Low latency ASIO 2.0 driver. */
317
    FMOD_OUTPUTTYPE_OSS,             /* Linux/Linux64/Solaris - Open Sound System output. (Default on Linux/Linux64/Solaris) */
318
    FMOD_OUTPUTTYPE_ALSA,            /* Linux/Linux64         - Advanced Linux Sound Architecture output. */
319
    FMOD_OUTPUTTYPE_ESD,             /* Linux/Linux64         - Enlightment Sound Daemon output. */
320
    FMOD_OUTPUTTYPE_SOUNDMANAGER,    /* Mac                   - Macintosh SoundManager output. */
321
    FMOD_OUTPUTTYPE_COREAUDIO,       /* Mac                   - Macintosh CoreAudio output.  (Default on Mac) */
322
    FMOD_OUTPUTTYPE_XBOX,            /* Xbox                  - Native hardware output. (Default on Xbox) */
323
    FMOD_OUTPUTTYPE_PS2,             /* PS2                   - Native hardware output. (Default on PS2) */
324
    FMOD_OUTPUTTYPE_PS3,             /* PS3                   - Native hardware output. (Default on PS3) */
325
    FMOD_OUTPUTTYPE_GC,              /* GameCube              - Native hardware output. (Default on GameCube) */
326
    FMOD_OUTPUTTYPE_XBOX360,         /* Xbox 360              - Native hardware output. (Default on Xbox 360) */
327
    FMOD_OUTPUTTYPE_PSP,             /* PSP                   - Native hardware output. (Default on PSP) */
328
        FMOD_OUTPUTTYPE_WII,                         /* Wii                                  - Native hardware output. (Default on Wii) */
329
330
    FMOD_OUTPUTTYPE_MAX,             /* Maximum number of output types supported. */
331
    FMOD_OUTPUTTYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
332
} FMOD_OUTPUTTYPE;
333
334
335
/*
336
[DEFINE] 
337
[
338
    [NAME]
339
    FMOD_CAPS
340
341
    [DESCRIPTION]   
342
    Bit fields to use with System::getDriverCaps to determine the capabilities of a card / output device.
343
344
    [REMARKS]
345
    It is important to check FMOD_CAPS_HARDWARE_EMULATED on windows machines, to then adjust System::setDSPBufferSize to (1024, 10) to compensate for the higher latency.
346
347
    [PLATFORMS]
348
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
349
350
    [SEE_ALSO]
351
    System::getDriverCaps
352
    System::setDSPBufferSize
353
]
354
*/
355
#define FMOD_CAPS_NONE                   0x00000000  /* Device has no special capabilities. */
356
#define FMOD_CAPS_HARDWARE               0x00000001  /* Device supports hardware mixing. */
357
#define FMOD_CAPS_HARDWARE_EMULATED      0x00000002  /* User has device set to 'Hardware acceleration = off' in control panel, and now extra 200ms latency is incurred. */
358
#define FMOD_CAPS_OUTPUT_MULTICHANNEL    0x00000004  /* Device can do multichannel output, ie greater than 2 channels. */
359
#define FMOD_CAPS_OUTPUT_FORMAT_PCM8     0x00000008  /* Device can output to 8bit integer PCM. */
360
#define FMOD_CAPS_OUTPUT_FORMAT_PCM16    0x00000010  /* Device can output to 16bit integer PCM. */
361
#define FMOD_CAPS_OUTPUT_FORMAT_PCM24    0x00000020  /* Device can output to 24bit integer PCM. */
362
#define FMOD_CAPS_OUTPUT_FORMAT_PCM32    0x00000040  /* Device can output to 32bit integer PCM. */
363
#define FMOD_CAPS_OUTPUT_FORMAT_PCMFLOAT 0x00000080  /* Device can output to 32bit floating point PCM. */
364
#define FMOD_CAPS_REVERB_EAX2            0x00000100  /* Device supports EAX2 reverb. */
365
#define FMOD_CAPS_REVERB_EAX3            0x00000200  /* Device supports EAX3 reverb. */
366
#define FMOD_CAPS_REVERB_EAX4            0x00000400  /* Device supports EAX4 reverb  */
367
#define FMOD_CAPS_REVERB_EAX5                         0x00000800  /* Device supports EAX5 reverb  */
368
#define FMOD_CAPS_REVERB_I3DL2           0x00001000  /* Device supports I3DL2 reverb. */
369
#define FMOD_CAPS_REVERB_LIMITED         0x00002000  /* Device supports some form of limited hardware reverb, maybe parameterless and only selectable by environment. */
370
/* [DEFINE_END] */
371
372
/*
373
[DEFINE] 
374
[
375
    [NAME]
376
    FMOD_DEBUGLEVEL
377
378
    [DESCRIPTION]   
379
    Bit fields to use with FMOD::Debug_SetLevel / FMOD::Debug_GetLevel to control the level of tty debug output with logging versions of FMOD (fmodL).
380
381
    [REMARKS]
382
383
    [PLATFORMS]
384
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
385
386
    [SEE_ALSO]
387
    Debug_SetLevel 
388
    Debug_GetLevel
389
]
390
*/
391
#define FMOD_DEBUG_LEVEL_NONE           0x00000000
392
#define FMOD_DEBUG_LEVEL_LOG            0x00000001
393
#define FMOD_DEBUG_LEVEL_ERROR          0x00000002
394
#define FMOD_DEBUG_LEVEL_WARNING        0x00000004
395
#define FMOD_DEBUG_LEVEL_HINT           0x00000008
396
#define FMOD_DEBUG_LEVEL_ALL            0x000000FF    
397
#define FMOD_DEBUG_TYPE_MEMORY          0x00000100
398
#define FMOD_DEBUG_TYPE_THREAD          0x00000200
399
#define FMOD_DEBUG_TYPE_FILE            0x00000400
400
#define FMOD_DEBUG_TYPE_NET             0x00000800
401
#define FMOD_DEBUG_TYPE_EVENT           0x00001000
402
#define FMOD_DEBUG_TYPE_ALL             0x0000FFFF                      
403
#define FMOD_DEBUG_DISPLAY_TIMESTAMPS   0x01000000
404
#define FMOD_DEBUG_DISPLAY_LINENUMBERS  0x02000000
405
#define FMOD_DEBUG_DISPLAY_COMPRESS     0x04000000
406
#define FMOD_DEBUG_DISPLAY_ALL          0x0F000000   
407
#define FMOD_DEBUG_ALL                  0xFFFFFFFF
408
/* [DEFINE_END] */
409
410
411
/*
412
[DEFINE] 
413
[
414
    [NAME]
415
    FMOD_MEMORY_TYPE
416
417
    [DESCRIPTION]   
418
    Bit fields for memory allocation type being passed into FMOD memory callbacks.
419
420
    [REMARKS]
421
    Remember this is a bitfield.  You may get more than 1 bit set (ie physical + persistent) so do not simply switch on the types!  You must check each bit individually or clear out the bits that you do not want within the callback.<br>
422
    Bits can be excluded if you want during Memory_Initialize so that you never get them.
423
424
    [PLATFORMS]
425
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
426
427
    [SEE_ALSO]
428
    FMOD_MEMORY_ALLOCCALLBACK
429
    FMOD_MEMORY_REALLOCCALLBACK
430
    FMOD_MEMORY_FREECALLBACK
431
    Memory_Initialize
432
    
433
]
434
*/
435
#define FMOD_MEMORY_NORMAL             0x00000000       /* Standard memory. */
436
#define FMOD_MEMORY_XBOX360_PHYSICAL   0x00100000       /* Requires XPhysicalAlloc / XPhysicalFree. */
437
#define FMOD_MEMORY_PERSISTENT         0x00200000       /* Persistent memory. Memory will be freed when System::release is called. */
438
#define FMOD_MEMORY_SECONDARY          0x00400000       /* Secondary memory. Allocation should be in secondary memory. For example RSX on the PS3. */
439
440
441
/* [DEFINE_END] */
442
443
444
/*
445
[ENUM]
446
[
447
    [DESCRIPTION]   
448
    These are speaker types defined for use with the System::setSpeakerMode or System::getSpeakerMode command.
449
450
    [REMARKS]
451
    These are important notes on speaker modes in regards to sounds created with FMOD_SOFTWARE.<br>
452
    Note below the phrase 'sound channels' is used.  These are the subchannels inside a sound, they are not related and 
453
    have nothing to do with the FMOD class "Channel".<br>
454
    For example a mono sound has 1 sound channel, a stereo sound has 2 sound channels, and an AC3 or 6 channel wav file have 6 "sound channels".<br>
455
    <br>
456
    FMOD_SPEAKERMODE_RAW<br>
457
    ---------------------<br>
458
    This mode is for output devices that are not specifically mono/stereo/quad/surround/5.1 or 7.1, but are multichannel.<br>
459
    Use System::setSoftwareFormat to specify the number of speakers you want to address, otherwise it will default to 2 (stereo).<br>
460
    Sound channels map to speakers sequentially, so a mono sound maps to output speaker 0, stereo sound maps to output speaker 0 & 1.<br>
461
    The user assumes knowledge of the speaker order.  FMOD_SPEAKER enumerations may not apply, so raw channel indices should be used.<br>
462
    Multichannel sounds map input channels to output channels 1:1. <br>
463
    Channel::setPan and Channel::setSpeakerMix do not work.<br>
464
    Speaker levels must be manually set with Channel::setSpeakerLevels.<br>
465
    <br>
466
    FMOD_SPEAKERMODE_MONO<br>
467
    ---------------------<br>
468
    This mode is for a 1 speaker arrangement.<br>
469
    Panning does not work in this speaker mode.<br>
470
    Mono, stereo and multichannel sounds have each sound channel played on the one speaker unity.<br>
471
    Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
472
    Channel::setSpeakerMix does not work.<br>
473
    <br>
474
    FMOD_SPEAKERMODE_STEREO<br>
475
    -----------------------<br>
476
    This mode is for 2 speaker arrangements that have a left and right speaker.<br>
477
    <li>Mono sounds default to an even distribution between left and right.  They can be panned with Channel::setPan.<br>
478
    <li>Stereo sounds default to the middle, or full left in the left speaker and full right in the right speaker.  
479
    <li>They can be cross faded with Channel::setPan.<br>
480
    <li>Multichannel sounds have each sound channel played on each speaker at unity.<br>
481
    <li>Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
482
    <li>Channel::setSpeakerMix works but only front left and right parameters are used, the rest are ignored.<br>
483
    <br>
484
    FMOD_SPEAKERMODE_QUAD<br>
485
    ------------------------<br>
486
    This mode is for 4 speaker arrangements that have a front left, front right, rear left and a rear right speaker.<br>
487
    <li>Mono sounds default to an even distribution between front left and front right.  They can be panned with Channel::setPan.<br>
488
    <li>Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.<br>
489
    <li>They can be cross faded with Channel::setPan.<br>
490
    <li>Multichannel sounds default to all of their sound channels being played on each speaker in order of input.<br>
491
    <li>Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
492
    <li>Channel::setSpeakerMix works but side left, side right, center and lfe are ignored.<br>
493
    <br>
494
    FMOD_SPEAKERMODE_SURROUND<br>
495
    ------------------------<br>
496
    This mode is for 5 speaker arrangements that have a left/right/center/rear left/rear right.<br>
497
    <li>Mono sounds default to the center speaker.  They can be panned with Channel::setPan.<br>
498
    <li>Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.  
499
    <li>They can be cross faded with Channel::setPan.<br>
500
    <li>Multichannel sounds default to all of their sound channels being played on each speaker in order of input.  
501
    <li>Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
502
    <li>Channel::setSpeakerMix works but side left / side right are ignored.<br>
503
    <br>
504
    FMOD_SPEAKERMODE_5POINT1<br>
505
    ------------------------<br>
506
    This mode is for 5.1 speaker arrangements that have a left/right/center/rear left/rear right and a subwoofer speaker.<br>
507
    <li>Mono sounds default to the center speaker.  They can be panned with Channel::setPan.<br>
508
    <li>Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.  
509
    <li>They can be cross faded with Channel::setPan.<br>
510
    <li>Multichannel sounds default to all of their sound channels being played on each speaker in order of input.  
511
    <li>Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
512
    <li>Channel::setSpeakerMix works but side left / side right are ignored.<br>
513
    <br>
514
    FMOD_SPEAKERMODE_7POINT1<br>
515
    ------------------------<br>
516
    This mode is for 7.1 speaker arrangements that have a left/right/center/rear left/rear right/side left/side right 
517
    and a subwoofer speaker.<br>
518
    <li>Mono sounds default to the center speaker.  They can be panned with Channel::setPan.<br>
519
    <li>Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right.  
520
    <li>They can be cross faded with Channel::setPan.<br>
521
    <li>Multichannel sounds default to all of their sound channels being played on each speaker in order of input.  
522
    <li>Mix behavior for multichannel sounds can be set with Channel::setSpeakerLevels.<br>
523
    <li>Channel::setSpeakerMix works and every parameter is used to set the balance of a sound in any speaker.<br>
524
    <br>
525
    FMOD_SPEAKERMODE_PROLOGIC<br>
526
    ------------------------------------------------------<br>
527
    This mode is for mono, stereo, 5.1 and 7.1 speaker arrangements, as it is backwards and forwards compatible with stereo, 
528
    but to get a surround effect a Dolby Prologic or Prologic 2 hardware decoder / amplifier is needed.<br>
529
    Pan behavior is the same as FMOD_SPEAKERMODE_5POINT1.<br>
530
    <br>
531
    If this function is called the numoutputchannels setting in System::setSoftwareFormat is overwritten.<br>
532
    <br>
533
    For 3D sounds, panning is determined at runtime by the 3D subsystem based on the speaker mode to determine which speaker the 
534
    sound should be placed in.<br>
535
536
    [PLATFORMS]
537
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
538
539
    [SEE_ALSO]
540
    System::setSpeakerMode
541
    System::getSpeakerMode
542
    System::getDriverCaps
543
    System::setSoftwareFormat
544
    Channel::setSpeakerLevels
545
]
546
*/
547
typedef enum
548
{
549
    FMOD_SPEAKERMODE_RAW,              /* There is no specific speakermode.  Sound channels are mapped in order of input to output.  Use System::setSoftwareFormat to specify speaker count. See remarks for more information. */
550
    FMOD_SPEAKERMODE_MONO,             /* The speakers are monaural. */
551
    FMOD_SPEAKERMODE_STEREO,           /* The speakers are stereo (DEFAULT). */
552
    FMOD_SPEAKERMODE_QUAD,             /* 4 speaker setup.  This includes front left, front right, rear left, rear right.  */
553
    FMOD_SPEAKERMODE_SURROUND,         /* 5 speaker setup.  This includes front left, front right, center, rear left, rear right. */
554
    FMOD_SPEAKERMODE_5POINT1,          /* 5.1 speaker setup.  This includes front left, front right, center, rear left, rear right and a subwoofer. */
555
    FMOD_SPEAKERMODE_7POINT1,          /* 7.1 speaker setup.  This includes front left, front right, center, rear left, rear right, side left, side right and a subwoofer. */
556
    FMOD_SPEAKERMODE_PROLOGIC,         /* Stereo output, but data is encoded in a way that is picked up by a Prologic/Prologic2 decoder and split into a 5.1 speaker setup. */
557
558
    FMOD_SPEAKERMODE_MAX,              /* Maximum number of speaker modes supported. */
559
    FMOD_SPEAKERMODE_FORCEINT = 65536  /* Makes sure this enum is signed 32bit. */
560
} FMOD_SPEAKERMODE;
561
562
563
/*
564
[ENUM]
565
[
566
    [DESCRIPTION]   
567
    These are speaker types defined for use with the Channel::setSpeakerLevels command.
568
    It can also be used for speaker placement in the System::set3DSpeakerPosition command.
569
570
    [REMARKS]
571
    If you are using FMOD_SPEAKERMODE_RAW and speaker assignments are meaningless, just cast a raw integer value to this type.<br>
572
    For example (FMOD_SPEAKER)7 would use the 7th speaker (also the same as FMOD_SPEAKER_SIDE_RIGHT).<br>
573
    Values higher than this can be used if an output system has more than 8 speaker types / output channels.  15 is the current maximum.<br>
574
    <br>
575
    NOTE: On Playstation 3 in 7.1, the extra 2 speakers are not side left/side right, they are 'surround back left'/'surround back right' which
576
    locate the speakers behind the listener instead of to the sides like on PC.  FMOD_SPEAKER_SBL/FMOD_SPEAKER_SBR are provided to make it 
577
    clearer what speaker is being addressed on that platform.
578
579
    [PLATFORMS]
580
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
581
582
    [SEE_ALSO]
583
    FMOD_SPEAKERMODE
584
    Channel::setSpeakerLevels
585
    Channel::getSpeakerLevels
586
    System::set3DSpeakerPosition
587
    System::get3DSpeakerPosition
588
]
589
*/
590
typedef enum
591
{
592
    FMOD_SPEAKER_FRONT_LEFT,
593
    FMOD_SPEAKER_FRONT_RIGHT,
594
    FMOD_SPEAKER_FRONT_CENTER,
595
    FMOD_SPEAKER_LOW_FREQUENCY,
596
    FMOD_SPEAKER_BACK_LEFT,
597
    FMOD_SPEAKER_BACK_RIGHT,
598
    FMOD_SPEAKER_SIDE_LEFT,
599
    FMOD_SPEAKER_SIDE_RIGHT,
600
    
601
    FMOD_SPEAKER_MAX,                                       /* Maximum number of speaker types supported. */
602
    FMOD_SPEAKER_MONO        = FMOD_SPEAKER_FRONT_LEFT,     /* For use with FMOD_SPEAKERMODE_MONO and Channel::SetSpeakerLevels.  Mapped to same value as FMOD_SPEAKER_FRONT_LEFT. */
603
    FMOD_SPEAKER_NULL        = FMOD_SPEAKER_MAX,            /* A non speaker.  Use this to send. */
604
    FMOD_SPEAKER_SBL         = FMOD_SPEAKER_SIDE_LEFT,      /* For use with FMOD_SPEAKERMODE_7POINT1 on PS3 where the extra speakers are surround back inside of side speakers. */
605
    FMOD_SPEAKER_SBR         = FMOD_SPEAKER_SIDE_RIGHT,     /* For use with FMOD_SPEAKERMODE_7POINT1 on PS3 where the extra speakers are surround back inside of side speakers. */
606
    FMOD_SPEAKER_FORCEINT    = 65536                        /* Makes sure this enum is signed 32bit. */
607
} FMOD_SPEAKER;
608
609
610
/*
611
[ENUM]
612
[
613
    [DESCRIPTION]   
614
    These are plugin types defined for use with the System::getNumPlugins, 
615
    System::getPluginInfo and System::unloadPlugin functions.
616
617
    [REMARKS]
618
619
    [PLATFORMS]
620
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
621
622
    [SEE_ALSO]
623
    System::getNumPlugins
624
    System::getPluginInfo
625
    System::unloadPlugin
626
]
627
*/
628
typedef enum
629
{
630
    FMOD_PLUGINTYPE_OUTPUT,          /* The plugin type is an output module.  FMOD mixed audio will play through one of these devices */
631
    FMOD_PLUGINTYPE_CODEC,           /* The plugin type is a file format codec.  FMOD will use these codecs to load file formats for playback. */
632
    FMOD_PLUGINTYPE_DSP,             /* The plugin type is a DSP unit.  FMOD will use these plugins as part of its DSP network to apply effects to output or generate sound in realtime. */
633
634
    FMOD_PLUGINTYPE_MAX,             /* Maximum number of plugin types supported. */
635
    FMOD_PLUGINTYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
636
} FMOD_PLUGINTYPE;
637
638
639
/*
640
[DEFINE]
641
[
642
    [NAME]
643
    FMOD_INITFLAGS
644
645
    [DESCRIPTION]   
646
    Initialization flags.  Use them with System::init in the flags parameter to change various behavior.  
647
648
    [REMARKS]
649
    Use System::setAdvancedSettings to adjust settings for some of the features that are enabled by these flags.
650
651
    [PLATFORMS]
652
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
653
654
    [SEE_ALSO]
655
    System::init
656
    System::update 
657
    System::setAdvancedSettings
658
    Channel::set3DOcclusion
659
]
660
*/
661
#define FMOD_INIT_NORMAL                 0x00000000 /* All platforms - Initialize normally */
662
#define FMOD_INIT_STREAM_FROM_UPDATE     0x00000001 /* All platforms - No stream thread is created internally.  Streams are driven from System::update.  Mainly used with non-realtime outputs. */
663
#define FMOD_INIT_3D_RIGHTHANDED         0x00000002 /* All platforms - FMOD will treat +X as right, +Y as up and +Z as backwards (towards you). */
664
#define FMOD_INIT_SOFTWARE_DISABLE       0x00000004 /* All platforms - Disable software mixer to save memory.  Anything created with FMOD_SOFTWARE will fail and DSP will not work. */
665
#define FMOD_INIT_SOFTWARE_OCCLUSION     0x00000008 /* All platforms - All FMOD_SOFTWARE with FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which is automatically used when Channel::set3DOcclusion is used or the geometry API. */
666
#define FMOD_INIT_SOFTWARE_HRTF          0x00000010 /* All platforms - All FMOD_SOFTWARE with FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which causes sounds to sound duller when the sound goes behind the listener.  Use System::setAdvancedSettings to adjust cutoff frequency. */
667
#define FMOD_INIT_SOFTWARE_REVERB_LOWMEM 0x00000040 /* All platforms - SFX reverb is run using 22/24khz delay buffers, halving the memory required. */
668
#define FMOD_INIT_ENABLE_PROFILE         0x00000020 /* All platforms - Enable TCP/IP based host which allows FMOD Designer or FMOD Profiler to connect to it, and view memory, CPU and the DSP network graph in real-time. */
669
#define FMOD_INIT_VOL0_BECOMES_VIRTUAL   0x00000080 /* All platforms - Any sounds that are 0 volume will go virtual and not be processed except for having their positions updated virtually.  Use System::setAdvancedSettings to adjust what volume besides zero to switch to virtual at. */
670
#define FMOD_INIT_WASAPI_EXCLUSIVE       0x00000100 /* Win32 Vista only - for WASAPI output - Enable exclusive access to hardware, lower latency at the expense of excluding other applications from accessing the audio hardware. */
671
#define FMOD_INIT_DSOUND_HRTFNONE        0x00000200 /* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use simple stereo panning/doppler/attenuation when 3D hardware acceleration is not present. */
672
#define FMOD_INIT_DSOUND_HRTFLIGHT       0x00000400 /* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use a slightly higher quality algorithm when 3D hardware acceleration is not present. */
673
#define FMOD_INIT_DSOUND_HRTFFULL        0x00000800 /* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use full quality 3D playback when 3d hardware acceleration is not present. */
674
#define FMOD_INIT_PS2_DISABLECORE0REVERB 0x00010000 /* PS2 only - Disable reverb on CORE 0 to regain 256k SRAM. */
675
#define FMOD_INIT_PS2_DISABLECORE1REVERB 0x00020000 /* PS2 only - Disable reverb on CORE 1 to regain 256k SRAM. */
676
#define FMOD_INIT_PS2_DONTUSESCRATCHPAD  0x00040000 /* PS2 only - Disable FMOD's usage of the scratchpad. */
677
#define FMOD_INIT_PS2_SWAPDMACHANNELS    0x00080000 /* PS2 only - Changes FMOD from using SPU DMA channel 0 for software mixing, and 1 for sound data upload/file streaming, to 1 and 0 respectively. */
678
#define FMOD_INIT_PS3_PREFERDTS          0x00800000 /* PS3 only - Prefer DTS over Dolby Digital if both are supported. Note: 8 and 6 channel LPCM is always preferred over both DTS and Dolby Digital. */
679
#define FMOD_INIT_PS3_FORCE2CHLPCM       0x01000000 /* PS3 only - Force PS3 system output mode to 2 channel LPCM. */
680
#define FMOD_INIT_XBOX_REMOVEHEADROOM    0x00100000 /* 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. */
681
#define FMOD_INIT_360_MUSICMUTENOTPAUSE  0x00200000 /* Xbox 360 only - The "music" channelgroup which by default pauses when custom 360 dashboard music is played, can be changed to mute (therefore continues playing) instead of pausing, by using this flag. */
682
#define FMOD_INIT_SYNCMIXERWITHUPDATE    0x00400000 /* Win32/Wii/PS3/Xbox/Xbox 360 - FMOD Mixer thread is woken up to do a mix when System::update is called rather than waking periodically on its own timer. */
683
#define FMOD_INIT_NEURALTHX              0x02000000 /* Win32/Mac/Linux/Solaris - Use Neural THX downmixing from 7.1 if speakermode set to FMOD_SPEAKERMODE_STEREO or FMOD_SPEAKERMODE_5POINT1. */
684
/* [DEFINE_END] */
685
686
687
/*
688
[ENUM]
689
[
690
    [DESCRIPTION]   
691
    These definitions describe the type of song being played.
692
693
    [REMARKS]
694
695
    [PLATFORMS]
696
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
697
698
    [SEE_ALSO]      
699
    Sound::getFormat
700
]
701
*/
702
typedef enum
703
{
704
    FMOD_SOUND_TYPE_UNKNOWN,         /* 3rd party / unknown plugin format. */
705
    FMOD_SOUND_TYPE_AAC,             /* AAC.  Currently unsupported. */
706
    FMOD_SOUND_TYPE_AIFF,            /* AIFF. */
707
    FMOD_SOUND_TYPE_ASF,             /* Microsoft Advanced Systems Format (ie WMA/ASF/WMV). */
708
    FMOD_SOUND_TYPE_AT3,             /* Sony ATRAC 3 format */
709
    FMOD_SOUND_TYPE_CDDA,            /* Digital CD audio. */
710
    FMOD_SOUND_TYPE_DLS,             /* Sound font / downloadable sound bank. */
711
    FMOD_SOUND_TYPE_FLAC,            /* FLAC lossless codec. */
712
    FMOD_SOUND_TYPE_FSB,             /* FMOD Sample Bank. */
713
    FMOD_SOUND_TYPE_GCADPCM,         /* GameCube ADPCM */
714
    FMOD_SOUND_TYPE_IT,              /* Impulse Tracker. */
715
    FMOD_SOUND_TYPE_MIDI,            /* MIDI. */
716
    FMOD_SOUND_TYPE_MOD,             /* Protracker / Fasttracker MOD. */
717
    FMOD_SOUND_TYPE_MPEG,            /* MP2/MP3 MPEG. */
718
    FMOD_SOUND_TYPE_OGGVORBIS,       /* Ogg vorbis. */
719
    FMOD_SOUND_TYPE_PLAYLIST,        /* Information only from ASX/PLS/M3U/WAX playlists */
720
    FMOD_SOUND_TYPE_RAW,             /* Raw PCM data. */
721
    FMOD_SOUND_TYPE_S3M,             /* ScreamTracker 3. */
722
    FMOD_SOUND_TYPE_SF2,             /* Sound font 2 format. */
723
    FMOD_SOUND_TYPE_USER,            /* User created sound. */
724
    FMOD_SOUND_TYPE_WAV,             /* Microsoft WAV. */
725
    FMOD_SOUND_TYPE_XM,              /* FastTracker 2 XM. */
726
    FMOD_SOUND_TYPE_XMA,             /* Xbox360 XMA */
727
    FMOD_SOUND_TYPE_VAG,             /* PlayStation 2 / PlayStation Portable adpcm VAG format. */
728
729
    FMOD_SOUND_TYPE_MAX,             /* Maximum number of sound types supported. */
730
    FMOD_SOUND_TYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
731
} FMOD_SOUND_TYPE;
732
733
734
/*
735
[ENUM]
736
[
737
    [DESCRIPTION]   
738
    These definitions describe the native format of the hardware or software buffer that will be used.
739
740
    [REMARKS]
741
    This is the format the native hardware or software buffer will be or is created in.
742
743
    [PLATFORMS]
744
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
745
746
    [SEE_ALSO]
747
    System::createSound
748
    Sound::getFormat
749
]
750
*/
751
typedef enum
752
{
753
    FMOD_SOUND_FORMAT_NONE,             /* Unitialized / unknown. */
754
    FMOD_SOUND_FORMAT_PCM8,             /* 8bit integer PCM data. */
755
    FMOD_SOUND_FORMAT_PCM16,            /* 16bit integer PCM data.  */
756
    FMOD_SOUND_FORMAT_PCM24,            /* 24bit integer PCM data.  */
757
    FMOD_SOUND_FORMAT_PCM32,            /* 32bit integer PCM data.  */
758
    FMOD_SOUND_FORMAT_PCMFLOAT,         /* 32bit floating point PCM data.  */
759
    FMOD_SOUND_FORMAT_GCADPCM,          /* Compressed GameCube DSP data. */
760
    FMOD_SOUND_FORMAT_IMAADPCM,         /* Compressed IMA ADPCM / Xbox ADPCM data. */
761
    FMOD_SOUND_FORMAT_VAG,              /* Compressed PlayStation 2 / PlayStation Portable ADPCM data. */
762
    FMOD_SOUND_FORMAT_XMA,              /* Compressed Xbox360 data. */
763
    FMOD_SOUND_FORMAT_MPEG,             /* Compressed MPEG layer 2 or 3 data. */
764
765
    FMOD_SOUND_FORMAT_MAX,              /* Maximum number of sound formats supported. */   
766
    FMOD_SOUND_FORMAT_FORCEINT = 65536  /* Makes sure this enum is signed 32bit. */
767
} FMOD_SOUND_FORMAT;
768
769
770
/*
771
[DEFINE]
772
[
773
    [NAME] 
774
    FMOD_MODE
775
776
    [DESCRIPTION]   
777
    Sound description bitfields, bitwise OR them together for loading and describing sounds.
778
779
    [REMARKS]
780
    By default a sound will open as a static sound that is decompressed fully into memory to PCM. (ie equivalent of FMOD_CREATESAMPLE)<br>
781
    To have a sound stream instead, use FMOD_CREATESTREAM, or use the wrapper function System::createStream.<br>
782
    Some opening modes (ie FMOD_OPENUSER, FMOD_OPENMEMORY, FMOD_OPENMEMORY_POINT, FMOD_OPENRAW) will need extra information.<br>
783
    This can be provided using the FMOD_CREATESOUNDEXINFO structure.
784
    <br>
785
    On Playstation 2, non VAG formats will default to FMOD_SOFTWARE if FMOD_HARDWARE is not specified.<br>
786
    This is due to PS2 hardware not supporting PCM data.<br>
787
    <br>
788
    Specifying FMOD_OPENMEMORY_POINT will POINT to your memory rather allocating its own sound buffers and duplicating it internally.<br>
789
    <b><u>This means you cannot free the memory while FMOD is using it, until after Sound::release is called.</b></u>
790
    With FMOD_OPENMEMORY_POINT, for PCM formats, only WAV, FSB, and RAW are supported.  For compressed formats, only those formats supported by FMOD_CREATECOMPRESSEDSAMPLE are supported.<br>
791
    With FMOD_OPENMEMORY_POINT and FMOD_OPENRAW or PCM, if using them together, note that you must pad the data on each side by 16 bytes.  This is so fmod can modify the ends of the data for looping/interpolation/mixing purposes.  If a wav file, you will need to insert silence, and then reset loop points to stop the playback from playing that silence.<br>
792
    With FMOD_OPENMEMORY_POINT, For Wii/PSP FMOD_HARDWARE supports this flag for the GCADPCM/VAG formats.  On other platforms FMOD_SOFTWARE must be used.<br>
793
    <br>
794
    <b>Xbox 360 memory</b> On Xbox 360 Specifying FMOD_OPENMEMORY_POINT to a virtual memory address will cause FMOD_ERR_INVALID_ADDRESS
795
    to be returned.  Use physical memory only for this functionality.<br>
796
    <br>
797
    FMOD_LOWMEM is used on a sound if you want to minimize the memory overhead, by having FMOD not allocate memory for certain 
798
    features that are not likely to be used in a game environment.  These are :<br>
799
    1. Sound::getName functionality is removed.  256 bytes per sound is saved.<br>
800
    2. For a stream, a default sentence is not created, 4 bytes per subsound.  On a 2000 subsound FSB this can save 8kb for example.  
801
       Sound::setSubSoundSentence can simply be used to set up a sentence as normal, System::playSound just wont play through the 
802
       whole set of subsounds by default any more.<br>
803
804
    [PLATFORMS]
805
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
806
807
    [SEE_ALSO]
808
    System::createSound
809
    System::createStream
810
    Sound::setMode
811
    Sound::getMode
812
    Channel::setMode
813
    Channel::getMode
814
    Sound::set3DCustomRolloff
815
    Channel::set3DCustomRolloff
816
    Sound::getOpenState
817
]
818
*/
819
#define FMOD_DEFAULT                   0x00000000  /* FMOD_DEFAULT is a default sound type.  Equivalent to all the defaults listed below.  FMOD_LOOP_OFF, FMOD_2D, FMOD_HARDWARE. */
820
#define FMOD_LOOP_OFF                  0x00000001  /* For non looping sounds. (DEFAULT).  Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI. */
821
#define FMOD_LOOP_NORMAL               0x00000002  /* For forward looping sounds. */
822
#define FMOD_LOOP_BIDI                 0x00000004  /* For bidirectional looping sounds. (only works on software mixed static sounds). */
823
#define FMOD_2D                        0x00000008  /* Ignores any 3d processing. (DEFAULT). */
824
#define FMOD_3D                        0x00000010  /* Makes the sound positionable in 3D.  Overrides FMOD_2D. */
825
#define FMOD_HARDWARE                  0x00000020  /* Attempts to make sounds use hardware acceleration. (DEFAULT). */
826
#define FMOD_SOFTWARE                  0x00000040  /* Makes the sound be mixed by the FMOD CPU based software mixer.  Overrides FMOD_HARDWARE.  Use this for FFT, DSP, compressed sample support, 2D multi-speaker support and other software related features. */
827
#define FMOD_CREATESTREAM              0x00000080  /* Decompress at runtime, streaming from the source provided (ie from disk).  Overrides FMOD_CREATESAMPLE and FMOD_CREATECOMPRESSEDSAMPLE.  Note a stream can only be played once at a time due to a stream only having 1 stream buffer and file handle.  Open multiple streams to have them play concurrently. */
828
#define FMOD_CREATESAMPLE              0x00000100  /* Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (ie PCM).  Fastest for FMOD_SOFTWARE based playback and most flexible.  */
829
#define FMOD_CREATECOMPRESSEDSAMPLE    0x00000200  /* Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed.  During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'.  Can only be used in combination with FMOD_SOFTWARE.  Overrides FMOD_CREATESAMPLE.  If the sound data is not ADPCM, MPEG or XMA it will behave as if it was created with FMOD_CREATESAMPLE and decode the sound into PCM. */
830
#define FMOD_OPENUSER                  0x00000400  /* Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks.  If a user created 'sample' is created with no read callback, the sample will be empty.  Use Sound::lock and Sound::unlock to place sound data into the sound if this is the case. */
831
#define FMOD_OPENMEMORY                0x00000800  /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds.  Use FMOD_CREATESOUNDEXINFO to specify length.  FMOD duplicates the memory into its own buffers.  Can be freed after open. */
832
#define FMOD_OPENMEMORY_POINT          0x10000000  /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds.  Use FMOD_CREATESOUNDEXINFO to specify length.  This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers.  For Wii/PSP FMOD_HARDWARE supports this flag for the GCADPCM/VAG formats.  On other platforms FMOD_SOFTWARE must be used, as sound hardware on the other platforms (ie PC) cannot access main ram.  Cannot be freed after open, only after Sound::release.   Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used. */
833
#define FMOD_OPENRAW                   0x00001000  /* Will ignore file format and treat as raw pcm.  Use FMOD_CREATESOUNDEXINFO to specify format.  Requires at least defaultfrequency, numchannels and format to be specified before it will open.  Must be little endian data. */
834
#define FMOD_OPENONLY                  0x00002000  /* Just open the file, dont prebuffer or read.  Good for fast opens for info, or when sound::readData is to be used. */
835
#define FMOD_ACCURATETIME              0x00004000  /* For System::createSound - for accurate Sound::getLength/Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files.  Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this. */
836
#define FMOD_MPEGSEARCH                0x00008000  /* For corrupted / bad MP3 files.  This will search all the way through the file until it hits a valid MPEG header.  Normally only searches for 4k. */
837
#define FMOD_NONBLOCKING               0x00010000  /* For opening sounds and getting streamed subsounds (seeking) asyncronously.  Use Sound::getOpenState to poll the state of the sound as it opens or retrieves the subsound in the background. */
838
#define FMOD_UNIQUE                    0x00020000  /* Unique sound, can only be played one at a time */
839
#define FMOD_3D_HEADRELATIVE           0x00040000  /* Make the sound's position, velocity and orientation relative to the listener. */
840
#define FMOD_3D_WORLDRELATIVE          0x00080000  /* Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) */
841
#define FMOD_3D_LOGROLLOFF             0x00100000  /* This sound will follow the standard logarithmic rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor.  (DEFAULT) */
842
#define FMOD_3D_LINEARROLLOFF          0x00200000  /* This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence.  Rolloffscale is ignored. */
843
#define FMOD_3D_CUSTOMROLLOFF          0x04000000  /* This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff.  */
844
#define FMOD_3D_IGNOREGEOMETRY         0x40000000  /* Is not affect by geometry occlusion.  If not specified in Sound::setMode, or Channel::setMode, the flag is cleared and it is affected by geometry again. */
845
#define FMOD_CDDA_FORCEASPI            0x00400000  /* For CDDA sounds only - use ASPI instead of NTSCSI to access the specified CD/DVD device. */
846
#define FMOD_CDDA_JITTERCORRECT        0x00800000  /* For CDDA sounds only - perform jitter correction. Jitter correction helps produce a more accurate CDDA stream at the cost of more CPU time. */
847
#define FMOD_UNICODE                   0x01000000  /* Filename is double-byte unicode. */
848
#define FMOD_IGNORETAGS                0x02000000  /* Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance). */
849
#define FMOD_LOWMEM                    0x08000000  /* Removes some features from samples to give a lower memory overhead, like Sound::getName.  See remarks. */
850
#define FMOD_LOADSECONDARYRAM          0x20000000  /* Load sound into the secondary RAM of supported platform. On PS3, sounds will be loaded into RSX/VRAM. */
851
#define FMOD_VIRTUAL_PLAYFROMSTART     0x80000000  /* For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start. */
852
853
/* [DEFINE_END] */
854
855
856
/*
857
[ENUM]
858
[
859
    [DESCRIPTION]   
860
    These values describe what state a sound is in after FMOD_NONBLOCKING has been used to open it.
861
862
    [REMARKS]    
863
864
    [PLATFORMS]
865
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
866
867
    [SEE_ALSO]
868
    Sound::getOpenState
869
    FMOD_MODE
870
]
871
*/
872
typedef enum
873
{
874
    FMOD_OPENSTATE_READY = 0,       /* Opened and ready to play. */
875
    FMOD_OPENSTATE_LOADING,         /* Initial load in progress. */
876
    FMOD_OPENSTATE_ERROR,           /* Failed to open - file not found, out of memory etc.  See return value of Sound::getOpenState for what happened. */
877
    FMOD_OPENSTATE_CONNECTING,      /* Connecting to remote host (internet sounds only). */
878
    FMOD_OPENSTATE_BUFFERING,       /* Buffering data. */
879
    FMOD_OPENSTATE_SEEKING,         /* Seeking to subsound and re-flushing stream buffer. */
880
    FMOD_OPENSTATE_STREAMING,       /* Ready and playing, but not possible to release at this time without stalling the main thread. */
881
882
    FMOD_OPENSTATE_MAX,             /* Maximum number of open state types. */
883
    FMOD_OPENSTATE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
884
} FMOD_OPENSTATE;
885
886
887
/*
888
[ENUM]
889
[
890
    [DESCRIPTION]   
891
    These flags are used with SoundGroup::setMaxAudibleBehavior to determine what happens when more sounds 
892
    are played than are specified with SoundGroup::setMaxAudible.
893
894
    [REMARKS]
895
    When using FMOD_SOUNDGROUP_BEHAVIOR_MUTE, SoundGroup::setMuteFadeSpeed can be used to stop a sudden transition.  
896
    Instead, the time specified will be used to cross fade between the sounds that go silent and the ones that become audible.
897
898
    [PLATFORMS]
899
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
900
901
    [SEE_ALSO]      
902
    SoundGroup::setMaxAudibleBehavior
903
    SoundGroup::getMaxAudibleBehavior
904
    SoundGroup::setMaxAudible
905
    SoundGroup::getMaxAudible
906
    SoundGroup::setMuteFadeSpeed
907
    SoundGroup::getMuteFadeSpeed
908
]
909
*/
910
typedef enum 
911
{
912
    FMOD_SOUNDGROUP_BEHAVIOR_FAIL,              /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will simply fail during System::playSound. */
913
    FMOD_SOUNDGROUP_BEHAVIOR_MUTE,              /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will be silent, then if another sound in the group stops the sound that was silent before becomes audible again. */
914
    FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,       /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will steal the quietest / least important sound playing in the group. */
915
916
    FMOD_SOUNDGROUP_BEHAVIOR_MAX,               /* Maximum number of open state types. */
917
    FMOD_SOUNDGROUP_BEHAVIOR_FORCEINT = 65536   /* Makes sure this enum is signed 32bit. */
918
} FMOD_SOUNDGROUP_BEHAVIOR;
919
920
921
/*
922
[ENUM]
923
[
924
    [DESCRIPTION]   
925
    These callback types are used with Channel::setCallback.
926
927
    [REMARKS]
928
    Each callback has commanddata parameters passed as int unique to the type of callback.<br>
929
    See reference to FMOD_CHANNEL_CALLBACK to determine what they might mean for each type of callback.<br>
930
    <br>
931
    <b>Note!</b>  Currently the user must call System::update for these callbacks to trigger!
932
933
    [PLATFORMS]
934
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
935
936
    [SEE_ALSO]      
937
    Channel::setCallback
938
    FMOD_CHANNEL_CALLBACK
939
    System::update
940
]
941
*/
942
typedef enum
943
{
944
    FMOD_CHANNEL_CALLBACKTYPE_END,                  /* Called when a sound ends. */
945
    FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE,         /* Called when a voice is swapped out or swapped in. */
946
    FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT,            /* Called when a syncpoint is encountered.  Can be from wav file markers. */
947
    FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION,            /* Called when the channel has its geometry occlusion value calculated.  Can be used to clamp or change the value. */
948
949
    FMOD_CHANNEL_CALLBACKTYPE_MAX,                  /* Maximum number of callback types supported. */
950
    FMOD_CHANNEL_CALLBACKTYPE_FORCEINT = 65536      /* Makes sure this enum is signed 32bit. */
951
} FMOD_CHANNEL_CALLBACKTYPE;
952
953
954
/*
955
[ENUM]
956
[
957
    [DESCRIPTION]   
958
    These callback types are used with System::setCallback.
959
960
    [REMARKS]
961
    Each callback has commanddata parameters passed as void* unique to the type of callback.<br>
962
    See reference to FMOD_SYSTEM_CALLBACK to determine what they might mean for each type of callback.<br>
963
    <br>
964
    <b>Note!</b> Using FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED (on Mac only) requires the application to be running an event loop which will allow external changes to device list to be detected by FMOD.
965
966
    [PLATFORMS]
967
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
968
969
    [SEE_ALSO]      
970
    System::setCallback
971
    FMOD_SYSTEM_CALLBACK
972
    System::update
973
    DSP::addInput
974
]
975
*/
976
typedef enum
977
{
978
    FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED,         /* Called from System::update when the enumerated list of devices has changed. */
979
    FMOD_SYSTEM_CALLBACKTYPE_MEMORYALLOCATIONFAILED,    /* Called directly when a memory allocation fails somewhere in FMOD. */
980
    FMOD_SYSTEM_CALLBACKTYPE_THREADCREATED,             /* Called directly when a thread is created. */
981
    FMOD_SYSTEM_CALLBACKTYPE_BADDSPCONNECTION,          /* Called when a bad connection was made with DSP::addInput. Usually called from mixer thread because that is where the connections are made.  */
982
    FMOD_SYSTEM_CALLBACKTYPE_BADDSPLEVEL,               /* Called when too many effects were added exceeding the maximum tree depth of 128.  This is most likely caused by accidentally adding too many DSP effects. Usually called from mixer thread because that is where the connections are made.  */
983
984
    FMOD_SYSTEM_CALLBACKTYPE_MAX,                       /* Maximum number of callback types supported. */
985
    FMOD_SYSTEM_CALLBACKTYPE_FORCEINT = 65536           /* Makes sure this enum is signed 32bit. */
986
} FMOD_SYSTEM_CALLBACKTYPE;
987
988
989
/* 
990
    FMOD Callbacks
991
*/
992
typedef FMOD_RESULT (F_CALLBACK *FMOD_SYSTEM_CALLBACK)       (FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACKTYPE type, void *commanddata1, void *commanddata2);
993
994
typedef FMOD_RESULT (F_CALLBACK *FMOD_CHANNEL_CALLBACK)      (FMOD_CHANNEL *channel, FMOD_CHANNEL_CALLBACKTYPE type, void *commanddata1, void *commanddata2);
995
996
typedef FMOD_RESULT (F_CALLBACK *FMOD_SOUND_NONBLOCKCALLBACK)(FMOD_SOUND *sound, FMOD_RESULT result);
997
typedef FMOD_RESULT (F_CALLBACK *FMOD_SOUND_PCMREADCALLBACK)(FMOD_SOUND *sound, void *data, unsigned int datalen);
998
typedef FMOD_RESULT (F_CALLBACK *FMOD_SOUND_PCMSETPOSCALLBACK)(FMOD_SOUND *sound, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
999
1000
typedef FMOD_RESULT (F_CALLBACK *FMOD_FILE_OPENCALLBACK)     (const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata);
1001
typedef FMOD_RESULT (F_CALLBACK *FMOD_FILE_CLOSECALLBACK)    (void *handle, void *userdata);
1002
typedef FMOD_RESULT (F_CALLBACK *FMOD_FILE_READCALLBACK)     (void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata);
1003
typedef FMOD_RESULT (F_CALLBACK *FMOD_FILE_SEEKCALLBACK)     (void *handle, unsigned int pos, void *userdata);
1004
1005
typedef void *      (F_CALLBACK *FMOD_MEMORY_ALLOCCALLBACK)  (unsigned int size, FMOD_MEMORY_TYPE type);
1006
typedef void *      (F_CALLBACK *FMOD_MEMORY_REALLOCCALLBACK)(void *ptr, unsigned int size, FMOD_MEMORY_TYPE type);
1007
typedef void        (F_CALLBACK *FMOD_MEMORY_FREECALLBACK)   (void *ptr, FMOD_MEMORY_TYPE type);
1008
1009
typedef float       (F_CALLBACK *FMOD_3D_ROLLOFFCALLBACK)    (FMOD_CHANNEL *channel, float distance);
1010
1011
1012
/*
1013
[ENUM]
1014
[
1015
    [DESCRIPTION]   
1016
    List of windowing methods used in spectrum analysis to reduce leakage / transient signals intefering with the analysis.<br>
1017
    This is a problem with analysis of continuous signals that only have a small portion of the signal sample (the fft window size).<br>
1018
    Windowing the signal with a curve or triangle tapers the sides of the fft window to help alleviate this problem.
1019
1020
    [REMARKS]
1021
    Cyclic signals such as a sine wave that repeat their cycle in a multiple of the window size do not need windowing.<br>
1022
    I.e. If the sine wave repeats every 1024, 512, 256 etc samples and the FMOD fft window is 1024, then the signal would not need windowing.<br>
1023
    Not windowing is the same as FMOD_DSP_FFT_WINDOW_RECT, which is the default.<br>
1024
    If the cycle of the signal (ie the sine wave) is not a multiple of the window size, it will cause frequency abnormalities, so a different windowing method is needed.<br>
1025
    <exclude>
1026
    <br>
1027
    FMOD_DSP_FFT_WINDOW_RECT.<br>
1028
    <img src = "rectangle.gif"></img><br>
1029
    <br>
1030
    FMOD_DSP_FFT_WINDOW_TRIANGLE.<br>
1031
    <img src = "triangle.gif"></img><br>
1032
    <br>
1033
    FMOD_DSP_FFT_WINDOW_HAMMING.<br>
1034
    <img src = "hamming.gif"></img><br>
1035
    <br>
1036
    FMOD_DSP_FFT_WINDOW_HANNING.<br>
1037
    <img src = "hanning.gif"></img><br>
1038
    <br>
1039
    FMOD_DSP_FFT_WINDOW_BLACKMAN.<br>
1040
    <img src = "blackman.gif"></img><br>
1041
    <br>
1042
    FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS.<br>
1043
    <img src = "blackmanharris.gif"></img>
1044
    </exclude>
1045
    
1046
    [PLATFORMS]
1047
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1048
1049
    [SEE_ALSO]      
1050
    System::getSpectrum
1051
    Channel::getSpectrum
1052
]
1053
*/
1054
typedef enum
1055
{
1056
    FMOD_DSP_FFT_WINDOW_RECT,            /* w[n] = 1.0                                                                                            */
1057
    FMOD_DSP_FFT_WINDOW_TRIANGLE,        /* w[n] = TRI(2n/N)                                                                                      */
1058
    FMOD_DSP_FFT_WINDOW_HAMMING,         /* w[n] = 0.54 - (0.46 * COS(n/N) )                                                                      */
1059
    FMOD_DSP_FFT_WINDOW_HANNING,         /* w[n] = 0.5 *  (1.0  - COS(n/N) )                                                                      */
1060
    FMOD_DSP_FFT_WINDOW_BLACKMAN,        /* w[n] = 0.42 - (0.5  * COS(n/N) ) + (0.08 * COS(2.0 * n/N) )                                           */
1061
    FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS,  /* w[n] = 0.35875 - (0.48829 * COS(1.0 * n/N)) + (0.14128 * COS(2.0 * n/N)) - (0.01168 * COS(3.0 * n/N)) */
1062
    
1063
    FMOD_DSP_FFT_WINDOW_MAX,             /* Maximum number of FFT window types supported. */
1064
    FMOD_DSP_FFT_WINDOW_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
1065
} FMOD_DSP_FFT_WINDOW;
1066
1067
1068
/*
1069
[ENUM]
1070
[
1071
    [DESCRIPTION]   
1072
    List of interpolation types that the FMOD Ex software mixer supports.  
1073
1074
    [REMARKS]
1075
    The default resampler type is FMOD_DSP_RESAMPLER_LINEAR.<br>
1076
    Use System::setSoftwareFormat to tell FMOD the resampling quality you require for FMOD_SOFTWARE based sounds.
1077
1078
    [PLATFORMS]
1079
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1080
1081
    [SEE_ALSO]      
1082
    System::setSoftwareFormat
1083
    System::getSoftwareFormat
1084
]
1085
*/
1086
typedef enum
1087
{
1088
    FMOD_DSP_RESAMPLER_NOINTERP,        /* No interpolation.  High frequency aliasing hiss will be audible depending on the sample rate of the sound. */
1089
    FMOD_DSP_RESAMPLER_LINEAR,          /* Linear interpolation (default method).  Fast and good quality, causes very slight lowpass effect on low frequency sounds. */
1090
    FMOD_DSP_RESAMPLER_CUBIC,           /* Cubic interoplation.  Slower than linear interpolation but better quality. */
1091
    FMOD_DSP_RESAMPLER_SPLINE,          /* 5 point spline interoplation.  Slowest resampling method but best quality. */
1092
1093
    FMOD_DSP_RESAMPLER_MAX,             /* Maximum number of resample methods supported. */
1094
    FMOD_DSP_RESAMPLER_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
1095
} FMOD_DSP_RESAMPLER;
1096
1097
1098
/*
1099
[ENUM]
1100
[
1101
    [DESCRIPTION]   
1102
    List of tag types that could be stored within a sound.  These include id3 tags, metadata from netstreams and vorbis/asf data.
1103
1104
    [REMARKS]
1105
1106
    [PLATFORMS]
1107
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1108
1109
    [SEE_ALSO]      
1110
    Sound::getTag
1111
]
1112
*/
1113
typedef enum
1114
{
1115
    FMOD_TAGTYPE_UNKNOWN = 0,
1116
    FMOD_TAGTYPE_ID3V1,
1117
    FMOD_TAGTYPE_ID3V2,
1118
    FMOD_TAGTYPE_VORBISCOMMENT,
1119
    FMOD_TAGTYPE_SHOUTCAST,
1120
    FMOD_TAGTYPE_ICECAST,
1121
    FMOD_TAGTYPE_ASF,
1122
    FMOD_TAGTYPE_MIDI,
1123
    FMOD_TAGTYPE_PLAYLIST,
1124
    FMOD_TAGTYPE_FMOD,
1125
    FMOD_TAGTYPE_USER,
1126
1127
    FMOD_TAGTYPE_MAX,               /* Maximum number of tag types supported. */
1128
    FMOD_TAGTYPE_FORCEINT = 65536   /* Makes sure this enum is signed 32bit. */
1129
} FMOD_TAGTYPE;
1130
1131
1132
/*
1133
[ENUM]
1134
[
1135
    [DESCRIPTION]   
1136
    List of data types that can be returned by Sound::getTag
1137
1138
    [REMARKS]
1139
1140
    [PLATFORMS]
1141
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1142
1143
    [SEE_ALSO]      
1144
    Sound::getTag
1145
]
1146
*/
1147
typedef enum
1148
{
1149
    FMOD_TAGDATATYPE_BINARY = 0,
1150
    FMOD_TAGDATATYPE_INT,
1151
    FMOD_TAGDATATYPE_FLOAT,
1152
    FMOD_TAGDATATYPE_STRING,
1153
    FMOD_TAGDATATYPE_STRING_UTF16,
1154
    FMOD_TAGDATATYPE_STRING_UTF16BE,
1155
    FMOD_TAGDATATYPE_STRING_UTF8,
1156
    FMOD_TAGDATATYPE_CDTOC,
1157
1158
    FMOD_TAGDATATYPE_MAX,               /* Maximum number of tag datatypes supported. */
1159
    FMOD_TAGDATATYPE_FORCEINT = 65536   /* Makes sure this enum is signed 32bit. */
1160
} FMOD_TAGDATATYPE;
1161
1162
1163
/*
1164
[ENUM]
1165
[
1166
    [DESCRIPTION]   
1167
    Types of delay that can be used with Channel::setDelay / Channel::getDelay.
1168
1169
    [REMARKS]
1170
    If you haven't called Channel::setDelay yet, if you call Channel::getDelay with FMOD_DELAYTYPE_DSPCLOCK_START it will return the 
1171
    equivalent global DSP clock value to determine when a channel started, so that you can use it for other channels to sync against.<br>
1172
    <br>
1173
    Use System::getDSPClock to also get the current dspclock time, a base for future calls to Channel::setDelay.<br>
1174
    <br>
1175
    Use FMOD_64BIT_ADD or FMOD_64BIT_SUB to add a hi/lo combination together and cope with wraparound.
1176
    <br>
1177
    If FMOD_DELAYTYPE_END_MS is specified, the value is not treated as a 64 bit number, just the delayhi value is used and it is treated as milliseconds.
1178
1179
    [PLATFORMS]
1180
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1181
1182
    [SEE_ALSO]      
1183
    Channel::setDelay
1184
    Channel::getDelay
1185
    System::getDSPClock
1186
]
1187
*/
1188
typedef enum
1189
{
1190
    FMOD_DELAYTYPE_END_MS,              /* Delay at the end of the sound in milliseconds.  Use delayhi only.   Channel::isPlaying will remain true until this delay has passed even though the sound itself has stopped playing.*/
1191
    FMOD_DELAYTYPE_DSPCLOCK_START,      /* Time the sound started if Channel::getDelay is used, or if Channel::setDelay is used, the sound will delay playing until this exact tick. */
1192
    FMOD_DELAYTYPE_DSPCLOCK_END,        /* Time the sound should end. If this is non-zero, the channel will go silent at this exact tick. */
1193
    FMOD_DELAYTYPE_DSPCLOCK_PAUSE,      /* Time the sound should pause. If this is non-zero, the channel will pause at this exact tick. */
1194
1195
    FMOD_DELAYTYPE_MAX,                 /* Maximum number of tag datatypes supported. */
1196
    FMOD_DELAYTYPE_FORCEINT = 65536     /* Makes sure this enum is signed 32bit. */
1197
} FMOD_DELAYTYPE;
1198
1199
1200
#define FMOD_64BIT_ADD(_hi1, _lo1, _hi2, _lo2) _hi1 += ((_hi2) + ((((_lo1) + (_lo2)) < (_lo1)) ? 1 : 0)); (_lo1) += (_lo2);
1201
#define FMOD_64BIT_SUB(_hi1, _lo1, _hi2, _lo2) _hi1 -= ((_hi2) + ((((_lo1) - (_lo2)) > (_lo1)) ? 1 : 0)); (_lo1) -= (_lo2);
1202
1203
1204
/*
1205
[STRUCTURE] 
1206
[
1207
    [DESCRIPTION]   
1208
    Structure describing a piece of tag data.
1209
1210
    [REMARKS]
1211
    Members marked with [in] mean the user sets the value before passing it to the function.<br>
1212
    Members marked with [out] mean FMOD sets the value to be used after the function exits.<br>
1213
1214
    [PLATFORMS]
1215
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1216
1217
    [SEE_ALSO]      
1218
    Sound::getTag
1219
    FMOD_TAGTYPE
1220
    FMOD_TAGDATATYPE
1221
]
1222
*/
1223
typedef struct FMOD_TAG
1224
{
1225
    FMOD_TAGTYPE      type;         /* [out] The type of this tag. */
1226
    FMOD_TAGDATATYPE  datatype;     /* [out] The type of data that this tag contains */
1227
    char             *name;         /* [out] The name of this tag i.e. "TITLE", "ARTIST" etc. */
1228
    void             *data;         /* [out] Pointer to the tag data - its format is determined by the datatype member */
1229
    unsigned int      datalen;      /* [out] Length of the data contained in this tag */
1230
    FMOD_BOOL         updated;      /* [out] True if this tag has been updated since last being accessed with Sound::getTag */
1231
} FMOD_TAG;
1232
1233
1234
/*
1235
[STRUCTURE] 
1236
[
1237
    [DESCRIPTION]   
1238
    Structure describing a CD/DVD table of contents
1239
1240
    [REMARKS]
1241
    Members marked with [in] mean the user sets the value before passing it to the function.<br>
1242
    Members marked with [out] mean FMOD sets the value to be used after the function exits.<br>
1243
1244
    [PLATFORMS]
1245
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1246
1247
    [SEE_ALSO]      
1248
    Sound::getTag
1249
]
1250
*/
1251
typedef struct FMOD_CDTOC
1252
{
1253
    int numtracks;                  /* [out] The number of tracks on the CD */
1254
    int min[100];                   /* [out] The start offset of each track in minutes */
1255
    int sec[100];                   /* [out] The start offset of each track in seconds */
1256
    int frame[100];                 /* [out] The start offset of each track in frames */
1257
} FMOD_CDTOC;
1258
1259
1260
/*
1261
[DEFINE]
1262
[
1263
    [NAME]
1264
    FMOD_TIMEUNIT
1265
1266
    [DESCRIPTION]   
1267
    List of time types that can be returned by Sound::getLength and used with Channel::setPosition or Channel::getPosition.
1268
1269
    [REMARKS]
1270
    FMOD_TIMEUNIT_SENTENCE_MS, FMOD_TIMEUNIT_SENTENCE_PCM, FMOD_TIMEUNIT_SENTENCE_PCMBYTES, FMOD_TIMEUNIT_SENTENCE and FMOD_TIMEUNIT_SENTENCE_SUBSOUND are only supported by Channel functions.
1271
    Do not combine flags except FMOD_TIMEUNIT_BUFFERED.
1272
1273
    [PLATFORMS]
1274
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1275
1276
    [SEE_ALSO]      
1277
    Sound::getLength
1278
    Channel::setPosition
1279
    Channel::getPosition
1280
]
1281
*/
1282
#define FMOD_TIMEUNIT_MS                0x00000001  /* Milliseconds. */
1283
#define FMOD_TIMEUNIT_PCM               0x00000002  /* PCM Samples, related to milliseconds * samplerate / 1000. */
1284
#define FMOD_TIMEUNIT_PCMBYTES          0x00000004  /* Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). */
1285
#define FMOD_TIMEUNIT_RAWBYTES          0x00000008  /* Raw file bytes of (compressed) sound data (does not include headers).  Only used by Sound::getLength and Channel::getPosition. */
1286
#define FMOD_TIMEUNIT_MODORDER          0x00000100  /* MOD/S3M/XM/IT.  Order in a sequenced module format.  Use Sound::getFormat to determine the PCM format being decoded to. */
1287
#define FMOD_TIMEUNIT_MODROW            0x00000200  /* MOD/S3M/XM/IT.  Current row in a sequenced module format.  Sound::getLength will return the number of rows in the currently playing or seeked to pattern. */
1288
#define FMOD_TIMEUNIT_MODPATTERN        0x00000400  /* MOD/S3M/XM/IT.  Current pattern in a sequenced module format.  Sound::getLength will return the number of patterns in the song and Channel::getPosition will return the currently playing pattern. */
1289
#define FMOD_TIMEUNIT_SENTENCE_MS       0x00010000  /* Currently playing subsound in a sentence time in milliseconds. */
1290
#define FMOD_TIMEUNIT_SENTENCE_PCM      0x00020000  /* Currently playing subsound in a sentence time in PCM Samples, related to milliseconds * samplerate / 1000. */
1291
#define FMOD_TIMEUNIT_SENTENCE_PCMBYTES 0x00040000  /* Currently playing subsound in a sentence time in bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). */
1292
#define FMOD_TIMEUNIT_SENTENCE          0x00080000  /* Currently playing sentence index according to the channel. */
1293
#define FMOD_TIMEUNIT_SENTENCE_SUBSOUND 0x00100000  /* Currently playing subsound index in a sentence. */
1294
#define FMOD_TIMEUNIT_BUFFERED          0x10000000  /* Time value as seen by buffered stream.  This is always ahead of audible time, and is only used for processing. */
1295
/* [DEFINE_END] */
1296
1297
1298
/*
1299
[ENUM]
1300
[
1301
    [DESCRIPTION]
1302
    When creating a multichannel sound, FMOD will pan them to their default speaker locations, for example a 6 channel sound will default to one channel per 5.1 output speaker.<br>
1303
    Another example is a stereo sound.  It will default to left = front left, right = front right.<br>
1304
    <br>
1305
    This is for sounds that are not 'default'.  For example you might have a sound that is 6 channels but actually made up of 3 stereo pairs, that should all be located in front left, front right only.
1306
1307
    [REMARKS]
1308
    For full flexibility of speaker assignments, use Channel::setSpeakerLevels.  This functionality is cheaper, uses less memory and easier to use.
1309
1310
    [PLATFORMS]
1311
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1312
1313
    [SEE_ALSO]
1314
    FMOD_CREATESOUNDEXINFO
1315
    Channel::setSpeakerLevels
1316
]
1317
*/
1318
typedef enum
1319
{
1320
    FMOD_SPEAKERMAPTYPE_DEFAULT,     /* This is the default, and just means FMOD decides which speakers it puts the source channels. */
1321
    FMOD_SPEAKERMAPTYPE_ALLMONO,     /* This means the sound is made up of all mono sounds.  All voices will be panned to the front center by default in this case.  */
1322
    FMOD_SPEAKERMAPTYPE_ALLSTEREO,   /* This means the sound is made up of all stereo sounds.  All voices will be panned to front left and front right alternating every second channel.  */
1323
    FMOD_SPEAKERMAPTYPE_51_PROTOOLS, /* Map a 5.1 sound to use protools L C R Ls Rs LFE mapping.  Will return an error if not a 6 channel sound. */
1324
} FMOD_SPEAKERMAPTYPE;
1325
1326
1327
/*
1328
[STRUCTURE] 
1329
[
1330
    [DESCRIPTION]
1331
    Use this structure with System::createSound when more control is needed over loading.<br>
1332
    The possible reasons to use this with System::createSound are:<br>
1333
    <li>Loading a file from memory.
1334
    <li>Loading a file from within another larger (possibly wad/pak) file, by giving the loader an offset and length.
1335
    <li>To create a user created / non file based sound.
1336
    <li>To specify a starting subsound to seek to within a multi-sample sounds (ie FSB/DLS/SF2) when created as a stream.
1337
    <li>To specify which subsounds to load for multi-sample sounds (ie FSB/DLS/SF2) so that memory is saved and only a subset is actually loaded/read from disk.
1338
    <li>To specify 'piggyback' read and seek callbacks for capture of sound data as fmod reads and decodes it.  Useful for ripping decoded PCM data from sounds as they are loaded / played.
1339
    <li>To specify a MIDI DLS/SF2 sample set file to load when opening a MIDI file.
1340
    See below on what members to fill for each of the above types of sound you want to create.
1341
1342
    [REMARKS]
1343
    This structure is optional!  Specify 0 or NULL in System::createSound if you don't need it!<br>
1344
    <br>
1345
    Members marked with [in] mean the user sets the value before passing it to the function.<br>
1346
    Members marked with [out] mean FMOD sets the value to be used after the function exits.<br>
1347
    <br>
1348
    <u>Loading a file from memory.</u><br>
1349
    <li>Create the sound using the FMOD_OPENMEMORY flag.<br>
1350
    <li>Mandatory.  Specify 'length' for the size of the memory block in bytes.
1351
    <li>Other flags are optional.
1352
    <br>
1353
    <br>
1354
    <u>Loading a file from within another larger (possibly wad/pak) file, by giving the loader an offset and length.</u><br>
1355
    <li>Mandatory.  Specify 'fileoffset' and 'length'.
1356
    <li>Other flags are optional.
1357
    <br>
1358
    <br>
1359
    <u>To create a user created / non file based sound.</u><br>
1360
    <li>Create the sound using the FMOD_OPENUSER flag.
1361
    <li>Mandatory.  Specify 'defaultfrequency, 'numchannels' and 'format'.
1362
    <li>Other flags are optional.
1363
    <br>
1364
    <br>
1365
    <u>To specify a starting subsound to seek to and flush with, within a multi-sample stream (ie FSB/DLS/SF2).</u><br>
1366
    <br>
1367
    <li>Mandatory.  Specify 'initialsubsound'.
1368
    <br>
1369
    <br>
1370
    <u>To specify which subsounds to load for multi-sample sounds (ie FSB/DLS/SF2) so that memory is saved and only a subset is actually loaded/read from disk.</u><br>
1371
    <br>
1372
    <li>Mandatory.  Specify 'inclusionlist' and 'inclusionlistnum'.
1373
    <br>
1374
    <br>
1375
    <u>To specify 'piggyback' read and seek callbacks for capture of sound data as fmod reads and decodes it.  Useful for ripping decoded PCM data from sounds as they are loaded / played.</u><br>
1376
    <br>
1377
    <li>Mandatory.  Specify 'pcmreadcallback' and 'pcmseekcallback'.
1378
    <br>
1379
    <br>
1380
    <u>To specify a MIDI DLS/SF2 sample set file to load when opening a MIDI file.</u><br>
1381
    <br>
1382
    <li>Mandatory.  Specify 'dlsname'.
1383
    <br>
1384
    <br>
1385
    Setting the 'decodebuffersize' is for cpu intensive codecs that may be causing stuttering, not file intensive codecs (ie those from CD or netstreams) which are normally altered with System::setStreamBufferSize.  As an example of cpu intensive codecs, an mp3 file will take more cpu to decode than a PCM wav file.<br>
1386
    If you have a stuttering effect, then it is using more cpu than the decode buffer playback rate can keep up with.  Increasing the decode buffersize will most likely solve this problem.<br>
1387
1388
    [PLATFORMS]
1389
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1390
1391
    [SEE_ALSO]
1392
    System::createSound
1393
    System::setStreamBufferSize
1394
    FMOD_MODE
1395
    FMOD_SOUND_FORMAT
1396
    FMOD_SOUND_TYPE
1397
    FMOD_SPEAKERMAPTYPE
1398
]
1399
*/
1400
typedef struct FMOD_CREATESOUNDEXINFO
1401
{
1402
    int                            cbsize;             /* [in] Size of this structure.  This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. */
1403
    unsigned int                   length;             /* [in] Optional. Specify 0 to ignore. Size in bytes of file to load, or sound to create (in this case only if FMOD_OPENUSER is used).  Required if loading from memory.  If 0 is specified, then it will use the size of the file (unless loading from memory then an error will be returned). */
1404
    unsigned int                   fileoffset;         /* [in] Optional. Specify 0 to ignore. Offset from start of the file to start loading from.  This is useful for loading files from inside big data files. */
1405
    int                            numchannels;        /* [in] Optional. Specify 0 to ignore. Number of channels in a sound mandatory if FMOD_OPENUSER or FMOD_OPENRAW is used. */
1406
    int                            defaultfrequency;   /* [in] Optional. Specify 0 to ignore. Default frequency of sound in a sound mandatory if FMOD_OPENUSER or FMOD_OPENRAW is used.  Other formats use the frequency determined by the file format. */
1407
    FMOD_SOUND_FORMAT              format;             /* [in] Optional. Specify 0 or FMOD_SOUND_FORMAT_NONE to ignore. Format of the sound mandatory if FMOD_OPENUSER or FMOD_OPENRAW is used.  Other formats use the format determined by the file format.   */
1408
    unsigned int                   decodebuffersize;   /* [in] Optional. Specify 0 to ignore. For streams.  This determines the size of the double buffer (in PCM samples) that a stream uses.  Use this for user created streams if you want to determine the size of the callback buffer passed to you.  Specify 0 to use FMOD's default size which is currently equivalent to 400ms of the sound format created/loaded. */
1409
    int                            initialsubsound;    /* [in] Optional. Specify 0 to ignore. In a multi-sample file format such as .FSB/.DLS/.SF2, specify the initial subsound to seek to, only if FMOD_CREATESTREAM is used. */
1410
    int                            numsubsounds;       /* [in] Optional. Specify 0 to ignore or have no subsounds.  In a user created multi-sample sound, specify the number of subsounds within the sound that are accessable with Sound::getSubSound. */
1411
    int                           *inclusionlist;      /* [in] Optional. Specify 0 to ignore. In a multi-sample format such as .FSB/.DLS/.SF2 it may be desirable to specify only a subset of sounds to be loaded out of the whole file.  This is an array of subsound indices to load into memory when created. */
1412
    int                            inclusionlistnum;   /* [in] Optional. Specify 0 to ignore. This is the number of integers contained within the inclusionlist array. */
1413
    FMOD_SOUND_PCMREADCALLBACK     pcmreadcallback;    /* [in] Optional. Specify 0 to ignore. Callback to 'piggyback' on FMOD's read functions and accept or even write PCM data while FMOD is opening the sound.  Used for user sounds created with FMOD_OPENUSER or for capturing decoded data as FMOD reads it. */
1414
    FMOD_SOUND_PCMSETPOSCALLBACK   pcmsetposcallback;  /* [in] Optional. Specify 0 to ignore. Callback for when the user calls a seeking function such as Channel::setTime or Channel::setPosition within a multi-sample sound, and for when it is opened.*/
1415
    FMOD_SOUND_NONBLOCKCALLBACK    nonblockcallback;   /* [in] Optional. Specify 0 to ignore. Callback for successful completion, or error while loading a sound that used the FMOD_NONBLOCKING flag.*/
1416
    const char                    *dlsname;            /* [in] Optional. Specify 0 to ignore. Filename for a DLS or SF2 sample set when loading a MIDI file. If not specified, on Windows it will attempt to open /windows/system32/drivers/gm.dls or /windows/system32/drivers/etc/gm.dls, on Mac it will attempt to load /System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls, otherwise the MIDI will fail to open. Current DLS support is for level 1 of the specification. */
1417
    const char                    *encryptionkey;      /* [in] Optional. Specify 0 to ignore. Key for encrypted FSB file.  Without this key an encrypted FSB file will not load. */
1418
    int                            maxpolyphony;       /* [in] Optional. Specify 0 to ignore. For sequenced formats with dynamic channel allocation such as .MID and .IT, this specifies the maximum voice count allowed while playing.  .IT defaults to 64.  .MID defaults to 32. */
1419
    void                          *userdata;           /* [in] Optional. Specify 0 to ignore. This is user data to be attached to the sound during creation.  Access via Sound::getUserData.  Note: This is not passed to FMOD_FILE_OPENCALLBACK, that is a different userdata that is file specific. */
1420
    FMOD_SOUND_TYPE                suggestedsoundtype; /* [in] Optional. Specify 0 or FMOD_SOUND_TYPE_UNKNOWN to ignore.  Instead of scanning all codec types, use this to speed up loading by making it jump straight to this codec. */
1421
    FMOD_FILE_OPENCALLBACK         useropen;           /* [in] Optional. Specify 0 to ignore. Callback for opening this file. */
1422
    FMOD_FILE_CLOSECALLBACK        userclose;          /* [in] Optional. Specify 0 to ignore. Callback for closing this file. */
1423
    FMOD_FILE_READCALLBACK         userread;           /* [in] Optional. Specify 0 to ignore. Callback for reading from this file. */
1424
    FMOD_FILE_SEEKCALLBACK         userseek;           /* [in] Optional. Specify 0 to ignore. Callback for seeking within this file. */
1425
    FMOD_SPEAKERMAPTYPE            speakermap;         /* [in] Optional. Specify 0 to ignore. Use this to differ the way fmod maps multichannel sounds to speakers.  See FMOD_SPEAKERMAPTYPE for more. */
1426
    FMOD_SOUNDGROUP               *initialsoundgroup;  /* [in] Optional. Specify 0 to ignore. Specify a sound group if required, to put sound in as it is created. */
1427
    unsigned int                   initialseekposition;/* [in] Optional. Specify 0 to ignore. For streams. Specify an initial position to seek the stream to. */
1428
    FMOD_TIMEUNIT                  initialseekpostype; /* [in] Optional. Specify 0 to ignore. For streams. Specify the time unit for the position set in initialseekposition. */
1429
1430
1431
} FMOD_CREATESOUNDEXINFO;
1432
1433
1434
/*
1435
[STRUCTURE] 
1436
[
1437
    [DESCRIPTION]
1438
    Structure defining a reverb environment.<br>
1439
    <br>
1440
    For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3
1441
    documentation at http://developer.creative.com/ under the 'downloads' section.<br>
1442
    If they do not have the EAX3 documentation, then most information can be attained from
1443
    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of 
1444
    EAX2.
1445
1446
    [REMARKS]
1447
    Note the default reverb properties are the same as the FMOD_PRESET_GENERIC preset.<br>
1448
    Note that integer values that typically range from -10,000 to 1000 are represented in 
1449
    decibels, and are of a logarithmic scale, not linear, wheras float values are always linear.<br>
1450
    <br>
1451
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.<br>
1452
    <br>
1453
    <b>SUPPORTED</b> next to each parameter means the platform the parameter can be set on.  Some platforms support all parameters and some don't.<br>
1454
    EAX   means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support EAX 1 to 4.<br>
1455
    EAX4  means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support EAX 4.<br>
1456
    I3DL2 means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support I3DL2 non EAX native reverb.<br>
1457
    GC    means Nintendo Gamecube hardware reverb (must use FMOD_HARDWARE).<br>
1458
    WII   means Nintendo Wii hardware reverb (must use FMOD_HARDWARE).<br>
1459
    Xbox1 means the original Xbox hardware reverb (must use FMOD_HARDWARE).<br>
1460
    PS2   means Playstation 2 hardware reverb (must use FMOD_HARDWARE).<br>
1461
    SFX   means FMOD SFX software reverb.  This works on any platform that uses FMOD_SOFTWARE for loading sounds.<br>
1462
    <br>
1463
    Members marked with [in] mean the user sets the value before passing it to the function.<br>
1464
    Members marked with [out] mean FMOD sets the value to be used after the function exits.<br>
1465
1466
    [PLATFORMS]
1467
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1468
1469
    [SEE_ALSO]
1470
    System::setReverbProperties
1471
    System::getReverbProperties
1472
    FMOD_REVERB_PRESETS
1473
    FMOD_REVERB_FLAGS
1474
]
1475
*/
1476
typedef struct FMOD_REVERB_PROPERTIES
1477
{                                   /*          MIN     MAX     DEFAULT  DESCRIPTION */
1478
    int          Instance;          /* [in]     0     , 3     , 0      , Environment Instance. Simultaneous HW reverbs are possible on some platforms. (SUPPORTED:EAX4/SFX(3 instances)/GC and Wii (2 instances)) */
1479
    int          Environment;       /* [in/out] -1    , 25    , -1     , sets all listener properties.  -1 = OFF.                                      (SUPPORTED:EAX/PS2) */
1480
    float        EnvSize;           /* [in/out] 1.0   , 100.0 , 7.5    , environment size in meters                                                    (SUPPORTED:EAX) */
1481
    float        EnvDiffusion;      /* [in/out] 0.0   , 1.0   , 1.0    , environment diffusion                                                         (SUPPORTED:EAX/Xbox1/GC) */
1482
    int          Room;              /* [in/out] -10000, 0     , -1000  , room effect level (at mid frequencies)                                        (SUPPORTED:EAX/Xbox1/GC/I3DL2/SFX) */
1483
    int          RoomHF;            /* [in/out] -10000, 0     , -100   , relative room effect level at high frequencies                                (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1484
    int          RoomLF;            /* [in/out] -10000, 0     , 0      , relative room effect level at low frequencies                                 (SUPPORTED:EAX/SFX) */
1485
    float        DecayTime;         /* [in/out] 0.1   , 20.0  , 1.49   , reverberation decay time at mid frequencies                                   (SUPPORTED:EAX/Xbox1/GC/I3DL2/SFX) */
1486
    float        DecayHFRatio;      /* [in/out] 0.1   , 2.0   , 0.83   , high-frequency to mid-frequency decay time ratio                              (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1487
    float        DecayLFRatio;      /* [in/out] 0.1   , 2.0   , 1.0    , low-frequency to mid-frequency decay time ratio                               (SUPPORTED:EAX) */
1488
    int          Reflections;       /* [in/out] -10000, 1000  , -2602  , early reflections level relative to room effect                               (SUPPORTED:EAX/Xbox1/GC/I3DL2/SFX) */
1489
    float        ReflectionsDelay;  /* [in/out] 0.0   , 0.3   , 0.007  , initial reflection delay time                                                 (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1490
    float        ReflectionsPan[3]; /* [in/out]       ,       , [0,0,0], early reflections panning vector                                              (SUPPORTED:EAX) */
1491
    int          Reverb;            /* [in/out] -10000, 2000  , 200    , late reverberation level relative to room effect                              (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1492
    float        ReverbDelay;       /* [in/out] 0.0   , 0.1   , 0.011  , late reverberation delay time relative to initial reflection                  (SUPPORTED:EAX/Xbox1/GC/I3DL2/SFX) */
1493
    float        ReverbPan[3];      /* [in/out]       ,       , [0,0,0], late reverberation panning vector                                             (SUPPORTED:EAX) */
1494
    float        EchoTime;          /* [in/out] .075  , 0.25  , 0.25   , echo time                                                                     (SUPPORTED:EAX/PS2(FMOD_PRESET_PS2_ECHO/FMOD_PRESET_PS2_DELAY only) */
1495
    float        EchoDepth;         /* [in/out] 0.0   , 1.0   , 0.0    , echo depth                                                                    (SUPPORTED:EAX/PS2(FMOD_PRESET_PS2_ECHO only) */
1496
    float        ModulationTime;    /* [in/out] 0.04  , 4.0   , 0.25   , modulation time                                                               (SUPPORTED:EAX) */
1497
    float        ModulationDepth;   /* [in/out] 0.0   , 1.0   , 0.0    , modulation depth                                                              (SUPPORTED:EAX/GC) */
1498
    float        AirAbsorptionHF;   /* [in/out] -100  , 0.0   , -5.0   , change in level per meter at high frequencies                                 (SUPPORTED:EAX) */
1499
    float        HFReference;       /* [in/out] 1000.0, 20000 , 5000.0 , reference high frequency (hz)                                                 (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1500
    float        LFReference;       /* [in/out] 20.0  , 1000.0, 250.0  , reference low frequency (hz)                                                  (SUPPORTED:EAX/SFX) */
1501
    float        RoomRolloffFactor; /* [in/out] 0.0   , 10.0  , 0.0    , like rolloffscale in System::set3DSettings but for reverb room size effect    (SUPPORTED:EAX/Xbox1/I3DL2/SFX) */
1502
    float        Diffusion;         /* [in/out] 0.0   , 100.0 , 100.0  , Value that controls the echo density in the late reverberation decay.         (SUPPORTED:I3DL2/Xbox1/SFX) */
1503
    float        Density;           /* [in/out] 0.0   , 100.0 , 100.0  , Value that controls the modal density in the late reverberation decay         (SUPPORTED:I3DL2/Xbox1/SFX) */
1504
    unsigned int Flags;             /* [in/out] FMOD_REVERB_FLAGS - modifies the behavior of above properties                                          (SUPPORTED:EAX/PS2/GC/WII) */
1505
} FMOD_REVERB_PROPERTIES;
1506
1507
1508
/*
1509
[DEFINE] 
1510
[
1511
    [NAME] 
1512
    FMOD_REVERB_FLAGS
1513
1514
    [DESCRIPTION]
1515
    Values for the Flags member of the FMOD_REVERB_PROPERTIES structure.
1516
1517
    [REMARKS]
1518
1519
    [PLATFORMS]
1520
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1521
1522
    [SEE_ALSO]
1523
    FMOD_REVERB_PROPERTIES
1524
]
1525
*/
1526
#define FMOD_REVERB_FLAGS_DECAYTIMESCALE        0x00000001 /* 'EnvSize' affects reverberation decay time */
1527
#define FMOD_REVERB_FLAGS_REFLECTIONSSCALE      0x00000002 /* 'EnvSize' affects reflection level */
1528
#define FMOD_REVERB_FLAGS_REFLECTIONSDELAYSCALE 0x00000004 /* 'EnvSize' affects initial reflection delay time */
1529
#define FMOD_REVERB_FLAGS_REVERBSCALE           0x00000008 /* 'EnvSize' affects reflections level */
1530
#define FMOD_REVERB_FLAGS_REVERBDELAYSCALE      0x00000010 /* 'EnvSize' affects late reverberation delay time */
1531
#define FMOD_REVERB_FLAGS_DECAYHFLIMIT          0x00000020 /* AirAbsorptionHF affects DecayHFRatio */
1532
#define FMOD_REVERB_FLAGS_ECHOTIMESCALE         0x00000040 /* 'EnvSize' affects echo time */
1533
#define FMOD_REVERB_FLAGS_MODULATIONTIMESCALE   0x00000080 /* 'EnvSize' affects modulation time */
1534
#define FMOD_REVERB_FLAGS_CORE0                 0x00000100 /* PS2 Only - Reverb is applied to CORE0 (hw voices 0-23) */
1535
#define FMOD_REVERB_FLAGS_CORE1                 0x00000200 /* PS2 Only - Reverb is applied to CORE1 (hw voices 24-47) */
1536
#define FMOD_REVERB_FLAGS_HIGHQUALITYREVERB     0x00000400 /* GameCube/Wii. Use high quality reverb */
1537
#define FMOD_REVERB_FLAGS_HIGHQUALITYDPL2REVERB 0x00000800 /* GameCube/Wii. Use high quality DPL2 reverb */
1538
1539
#define FMOD_REVERB_FLAGS_DEFAULT              (FMOD_REVERB_FLAGS_DECAYTIMESCALE |        \
1540
                                                FMOD_REVERB_FLAGS_REFLECTIONSSCALE |      \
1541
                                                FMOD_REVERB_FLAGS_REFLECTIONSDELAYSCALE | \
1542
                                                FMOD_REVERB_FLAGS_REVERBSCALE |           \
1543
                                                FMOD_REVERB_FLAGS_REVERBDELAYSCALE |      \
1544
                                                FMOD_REVERB_FLAGS_DECAYHFLIMIT |          \
1545
                                                FMOD_REVERB_FLAGS_CORE0 |                 \
1546
                                                FMOD_REVERB_FLAGS_CORE1)
1547
/* [DEFINE_END] */
1548
1549
1550
/*
1551
[DEFINE] 
1552
[
1553
    [NAME] 
1554
    FMOD_REVERB_PRESETS
1555
1556
    [DESCRIPTION]   
1557
    A set of predefined environment PARAMETERS, created by Creative Labs
1558
    These are used to initialize an FMOD_REVERB_PROPERTIES structure statically.
1559
    ie 
1560
    FMOD_REVERB_PROPERTIES prop = FMOD_PRESET_GENERIC;
1561
1562
    [REMARKS]
1563
1564
    [PLATFORMS]
1565
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1566
1567
    [SEE_ALSO]
1568
    System::setReverbProperties
1569
]
1570
*/
1571
/*                                    Inst 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 */
1572
#define FMOD_PRESET_OFF              {  0, -1,  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 }
1573
#define FMOD_PRESET_GENERIC          {  0,  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 }
1574
#define FMOD_PRESET_PADDEDCELL       {  0,  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 }
1575
#define FMOD_PRESET_ROOM             {  0,  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 }
1576
#define FMOD_PRESET_BATHROOM         {  0,  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 }
1577
#define FMOD_PRESET_LIVINGROOM       {  0,  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 }
1578
#define FMOD_PRESET_STONEROOM        {  0,  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 }
1579
#define FMOD_PRESET_AUDITORIUM       {  0,  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 }
1580
#define FMOD_PRESET_CONCERTHALL      {  0,  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 }
1581
#define FMOD_PRESET_CAVE             {  0,  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 }
1582
#define FMOD_PRESET_ARENA            {  0,  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 }
1583
#define FMOD_PRESET_HANGAR           {  0,  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 }
1584
#define FMOD_PRESET_CARPETTEDHALLWAY {  0,  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 }
1585
#define FMOD_PRESET_HALLWAY          {  0,  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 }
1586
#define FMOD_PRESET_STONECORRIDOR    {  0,  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 }
1587
#define FMOD_PRESET_ALLEY            {  0,  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 }
1588
#define FMOD_PRESET_FOREST           {  0,  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 }
1589
#define FMOD_PRESET_CITY             {  0,  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 }
1590
#define FMOD_PRESET_MOUNTAINS        {  0,  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 }
1591
#define FMOD_PRESET_QUARRY           {  0,  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 }
1592
#define FMOD_PRESET_PLAIN            {  0,  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 }
1593
#define FMOD_PRESET_PARKINGLOT       {  0,  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 }
1594
#define FMOD_PRESET_SEWERPIPE        {  0,  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 }
1595
#define FMOD_PRESET_UNDERWATER       {  0,  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 }
1596
1597
/* Non I3DL2 presets */
1598
1599
#define FMOD_PRESET_DRUGGED          {  0,  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 }
1600
#define FMOD_PRESET_DIZZY            {  0,  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 }
1601
#define FMOD_PRESET_PSYCHOTIC        {  0,  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 }
1602
1603
/* PlayStation 2 / PlayStation Portable Only presets */
1604
1605
#define FMOD_PRESET_PS2_ROOM         {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1606
#define FMOD_PRESET_PS2_STUDIO_A     {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1607
#define FMOD_PRESET_PS2_STUDIO_B     {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1608
#define FMOD_PRESET_PS2_STUDIO_C     {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1609
#define FMOD_PRESET_PS2_HALL         {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1610
#define FMOD_PRESET_PS2_SPACE        {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1611
#define FMOD_PRESET_PS2_ECHO         {  0,  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.250f, 0.75f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1612
#define FMOD_PRESET_PS2_DELAY        {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1613
#define FMOD_PRESET_PS2_PIPE         {  0,  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.250f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
1614
/* [DEFINE_END] */
1615
1616
1617
/*
1618
[STRUCTURE] 
1619
[
1620
    [DESCRIPTION]
1621
    Structure defining the properties for a reverb source, related to a FMOD channel.<br>
1622
    <br>
1623
    For more indepth descriptions of the reverb properties under win32, please see the EAX3
1624
    documentation at http://developer.creative.com/ under the 'downloads' section.<br>
1625
    If they do not have the EAX3 documentation, then most information can be attained from
1626
    the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of 
1627
    EAX2.<br>
1628
    <br>
1629
    Note the default reverb properties are the same as the FMOD_PRESET_GENERIC preset.<br>
1630
    Note that integer values that typically range from -10,000 to 1000 are represented in 
1631
    decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.<br>
1632
    PORTABILITY: Each member has the platform it supports in braces ie (win32/Xbox).<br>
1633
    Some reverb parameters are only supported in win32 and some only on Xbox. If all parameters are set then
1634
    the reverb should product a similar effect on either platform.<br>
1635
    <br>
1636
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.<br>
1637
1638
    [REMARKS]
1639
    <b>SUPPORTED</b> next to each parameter means the platform the parameter can be set on.  Some platforms support all parameters and some don't.<br>
1640
    EAX   means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support EAX 1 to 4.<br>
1641
    EAX4  means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support EAX 4.<br>
1642
    I3DL2 means hardware reverb on FMOD_OUTPUTTYPE_DSOUND on windows only (must use FMOD_HARDWARE), on soundcards that support I3DL2 non EAX native reverb.<br>
1643
    GC    means Nintendo Gamecube hardware reverb (must use FMOD_HARDWARE).<br>
1644
    WII   means Nintendo Wii hardware reverb (must use FMOD_HARDWARE).<br>
1645
    Xbox1 means the original Xbox hardware reverb (must use FMOD_HARDWARE).<br>
1646
    PS2   means Playstation 2 hardware reverb (must use FMOD_HARDWARE).<br>
1647
    SFX   means FMOD SFX software reverb.  This works on any platform that uses FMOD_SOFTWARE for loading sounds.<br>
1648
    <br>
1649
    <br>
1650
    <b>'ConnectionPoint' Parameter.</b>  This parameter is for the FMOD software reverb only (known as SFX in the list above).<br>
1651
    By default the dsp network connection for a channel and its reverb is between the 'SFX Reverb' unit, and the channel's wavetable/resampler/dspcodec/oscillator unit (the unit below the channel DSP head).  NULL can be used for this parameter to make it use this default behaviour.<br>
1652
    This parameter allows the user to connect the SFX reverb to somewhere else internally, for example the channel DSP head, or a related channelgroup.  The event system uses this so that it can have the output of an event going to the reverb, instead of just the output of the event's channels (thereby ignoring event effects/submixes etc).<br>
1653
    Do not use if you are unaware of DSP network connection issues.  Leave it at the default of NULL instead.<br>
1654
1655
1656
    [PLATFORMS]
1657
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1658
1659
    [SEE_ALSO]
1660
    Channel::setReverbProperties
1661
    Channel::getReverbProperties
1662
    FMOD_REVERB_CHANNELFLAGS 
1663
]
1664
*/
1665
typedef struct FMOD_REVERB_CHANNELPROPERTIES
1666
{                                      /*          MIN     MAX    DEFAULT  DESCRIPTION */
1667
    int          Direct;               /* [in/out] -10000, 1000,  0,       direct path level (at low and mid frequencies)              (SUPPORTED:EAX/I3DL2/Xbox1/SFX) */
1668
    int          DirectHF;             /* [in/out] -10000, 0,     0,       relative direct path level at high frequencies              (SUPPORTED:EAX/I3DL2/Xbox1) */
1669
    int          Room;                 /* [in/out] -10000, 1000,  0,       room effect level (at low and mid frequencies)              (SUPPORTED:EAX/I3DL2/Xbox1/GC/SFX) */
1670
    int          RoomHF;               /* [in/out] -10000, 0,     0,       relative room effect level at high frequencies              (SUPPORTED:EAX/I3DL2/Xbox1) */
1671
    int          Obstruction;          /* [in/out] -10000, 0,     0,       main obstruction control (attenuation at high frequencies)  (SUPPORTED:EAX/I3DL2/Xbox1) */
1672
    float        ObstructionLFRatio;   /* [in/out] 0.0,    1.0,   0.0,     obstruction low-frequency level re. main control            (SUPPORTED:EAX/I3DL2/Xbox1) */
1673
    int          Occlusion;            /* [in/out] -10000, 0,     0,       main occlusion control (attenuation at high frequencies)    (SUPPORTED:EAX/I3DL2/Xbox1) */
1674
    float        OcclusionLFRatio;     /* [in/out] 0.0,    1.0,   0.25,    occlusion low-frequency level re. main control              (SUPPORTED:EAX/I3DL2/Xbox1) */
1675
    float        OcclusionRoomRatio;   /* [in/out] 0.0,    10.0,  1.5,     relative occlusion control for room effect                  (SUPPORTED:EAX only) */
1676
    float        OcclusionDirectRatio; /* [in/out] 0.0,    10.0,  1.0,     relative occlusion control for direct path                  (SUPPORTED:EAX only) */
1677
    int          Exclusion;            /* [in/out] -10000, 0,     0,       main exlusion control (attenuation at high frequencies)     (SUPPORTED:EAX only) */
1678
    float        ExclusionLFRatio;     /* [in/out] 0.0,    1.0,   1.0,     exclusion low-frequency level re. main control              (SUPPORTED:EAX only) */
1679
    int          OutsideVolumeHF;      /* [in/out] -10000, 0,     0,       outside sound cone level at high frequencies                (SUPPORTED:EAX only) */
1680
    float        DopplerFactor;        /* [in/out] 0.0,    10.0,  0.0,     like DS3D flDopplerFactor but per source                    (SUPPORTED:EAX only) */
1681
    float        RolloffFactor;        /* [in/out] 0.0,    10.0,  0.0,     like DS3D flRolloffFactor but per source                    (SUPPORTED:EAX only) */
1682
    float        RoomRolloffFactor;    /* [in/out] 0.0,    10.0,  0.0,     like DS3D flRolloffFactor but for room effect               (SUPPORTED:EAX/I3DL2/Xbox1) */
1683
    float        AirAbsorptionFactor;  /* [in/out] 0.0,    10.0,  1.0,     multiplies AirAbsorptionHF member of FMOD_REVERB_PROPERTIES (SUPPORTED:EAX only) */
1684
    unsigned int Flags;                /* [in/out] FMOD_REVERB_CHANNELFLAGS - modifies the behavior of properties                      (SUPPORTED:EAX only) */
1685
    FMOD_DSP    *ConnectionPoint;      /* [in/out] See remarks.            DSP network location to connect reverb for this channel.    (SUPPORTED:SFX only).*/
1686
} FMOD_REVERB_CHANNELPROPERTIES;
1687
1688
1689
/*
1690
[DEFINE] 
1691
[
1692
    [NAME] 
1693
    FMOD_REVERB_CHANNELFLAGS
1694
1695
    [DESCRIPTION]
1696
    Values for the Flags member of the FMOD_REVERB_CHANNELPROPERTIES structure.
1697
1698
    [REMARKS]
1699
    For EAX4,EAX5 and SFX, there is support for multiple reverb environments.<br>
1700
    Use FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT0 to FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT3 in the flags member 
1701
    of FMOD_REVERB_CHANNELPROPERTIES to specify which environment instance(s) to target. <br>
1702
    Do not combine these.  If you do the first reverb instance will be used.<br>
1703
    If you do not specify any instance the first reverb instance will be used.<br>
1704
1705
    [PLATFORMS]
1706
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1707
1708
    [SEE_ALSO]
1709
    FMOD_REVERB_CHANNELPROPERTIES
1710
]
1711
*/
1712
#define FMOD_REVERB_CHANNELFLAGS_DIRECTHFAUTO  0x00000001 /* Automatic setting of 'Direct'  due to distance from listener */
1713
#define FMOD_REVERB_CHANNELFLAGS_ROOMAUTO      0x00000002 /* Automatic setting of 'Room'  due to distance from listener */
1714
#define FMOD_REVERB_CHANNELFLAGS_ROOMHFAUTO    0x00000004 /* Automatic setting of 'RoomHF' due to distance from listener */
1715
#define FMOD_REVERB_CHANNELFLAGS_INSTANCE0     0x00000010 /* EAX4/SFX/GameCube/Wii. Specify channel to target reverb instance 0.  Default target. */
1716
#define FMOD_REVERB_CHANNELFLAGS_INSTANCE1     0x00000020 /* EAX4/SFX/GameCube/Wii. Specify channel to target reverb instance 1. */
1717
#define FMOD_REVERB_CHANNELFLAGS_INSTANCE2     0x00000040 /* EAX4/SFX/GameCube/Wii. Specify channel to target reverb instance 2. */
1718
#define FMOD_REVERB_CHANNELFLAGS_INSTANCE3     0x00000080 /* EAX5/SFX. Specify channel to target reverb instance 3. */
1719
1720
#define FMOD_REVERB_CHANNELFLAGS_DEFAULT       (FMOD_REVERB_CHANNELFLAGS_DIRECTHFAUTO | \
1721
                                                FMOD_REVERB_CHANNELFLAGS_ROOMAUTO|      \
1722
                                                FMOD_REVERB_CHANNELFLAGS_ROOMHFAUTO|    \
1723
                                                FMOD_REVERB_CHANNELFLAGS_INSTANCE0)
1724
/* [DEFINE_END] */
1725
1726
1727
/*
1728
[STRUCTURE] 
1729
[
1730
    [DESCRIPTION]
1731
    Settings for advanced features like configuring memory and cpu usage for the FMOD_CREATECOMPRESSEDSAMPLE feature.
1732
1733
    [REMARKS]
1734
    maxMPEGcodecs / maxADPCMcodecs / maxXMAcodecs will determine the maximum cpu usage of playing realtime samples.  Use this to lower potential excess cpu usage and also control memory usage.<br>
1735
    <br>
1736
    maxPCMcodecs is for use with PS3 only. It will determine the maximum number of PCM voices that can be played at once. This includes streams of any format and all sounds created
1737
    *without* the FMOD_CREATECOMPRESSEDSAMPLE flag.
1738
    <br>
1739
    Memory will be allocated for codecs 'up front' (during System::init) if these values are specified as non zero.  If any are zero, it allocates memory for the codec whenever a file of the type in question is loaded.  So if maxMPEGcodecs is 0 for example, it will allocate memory for the mpeg codecs the first time an mp3 is loaded or an mp3 based .FSB file is loaded.<br>
1740
    <br>
1741
    Due to inefficient encoding techniques on certain .wav based ADPCM files, FMOD can can need an extra 29720 bytes per codec.  This means for lowest memory consumption.  Use FSB as it uses an optimal/small ADPCM block size.<br>
1742
1743
    [PLATFORMS]
1744
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1745
1746
    [SEE_ALSO]
1747
    System::setAdvancedSettings
1748
    System::getAdvancedSettings
1749
    System::init
1750
    FMOD_MODE
1751
]
1752
*/
1753
typedef struct FMOD_ADVANCEDSETTINGS
1754
{                       
1755
    int             cbsize;                   /* [in]     Size of this structure.  Use sizeof(FMOD_ADVANCEDSETTINGS)  NOTE: This must be set before calling System::getAdvancedSettings! */
1756
    int             maxMPEGcodecs;            /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only.  Mpeg  codecs consume 29,424 bytes per instance and this number will determine how many mpeg channels can be played simultaneously.  Default = 16. */
1757
    int             maxADPCMcodecs;           /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only.  ADPCM codecs consume 2,136 bytes per instance (based on FSB encoded ADPCM block size - see remarks) and this number will determine how many ADPCM channels can be played simultaneously.  Default = 32. */
1758
    int             maxXMAcodecs;             /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only.  XMA   codecs consume 20,512 bytes per instance and this number will determine how many XMA channels can be played simultaneously.  Default = 32.  */
1759
    int             maxPCMcodecs;             /* [in/out] Optional. Specify 0 to ignore. For use with PS3 only.                          PCM   codecs consume 12,672 bytes per instance and this number will determine how many streams and PCM voices can be played simultaneously. Default = 16 */
1760
    int             ASIONumChannels;          /* [in/out] Optional. Specify 0 to ignore. Number of channels available on the ASIO device. */
1761
    char          **ASIOChannelList;          /* [in/out] Optional. Specify 0 to ignore. Pointer to an array of strings (number of entries defined by ASIONumChannels) with ASIO channel names. */
1762
    FMOD_SPEAKER   *ASIOSpeakerList;          /* [in/out] Optional. Specify 0 to ignore. Pointer to a list of speakers that the ASIO channels map to.  This can be called after System::init to remap ASIO output. */
1763
    int             max3DReverbDSPs;          /* [in/out] Optional. Specify 0 to ignore. The max number of 3d reverb DSP's in the system. (NOTE: CURRENTLY DISABLED / UNUSED) */
1764
    float           HRTFMinAngle;             /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_INIT_SOFTWARE_HRTF.  The angle range (0-360) of a 3D sound in relation to the listener, at which the HRTF function begins to have an effect. 0 = in front of the listener. 180 = from 90 degrees to the left of the listener to 90 degrees to the right. 360 = behind the listener. Default = 180.0. */
1765
    float           HRTFMaxAngle;             /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_INIT_SOFTWARE_HRTF.  The angle range (0-360) of a 3D sound in relation to the listener, at which the HRTF function has maximum effect. 0 = front of the listener. 180 = from 90 degrees to the left of the listener to 90 degrees to the right. 360 = behind the listener. Default = 360.0. */
1766
    float           HRTFFreq;                 /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_INIT_SOFTWARE_HRTF.  The cutoff frequency of the HRTF's lowpass filter function when at maximum effect. (i.e. at HRTFMaxAngle).  Default = 4000.0. */
1767
    float           vol0virtualvol;           /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_INIT_VOL0_BECOMES_VIRTUAL.  If this flag is used, and the volume is 0.0, then the sound will become virtual.  Use this value to raise the threshold to a different point where a sound goes virtual. */
1768
    int             eventqueuesize;           /* [in/out] Optional. Specify 0 to ignore. For use with FMOD Event system only.  Specifies the number of slots available for simultaneous non blocking loads.  Default = 32. */
1769
    unsigned int    defaultDecodeBufferSize;  /* [in/out] Optional. Specify 0 to ignore. For streams. This determines the default size of the double buffer (in milliseconds) that a stream uses.  Default = 400ms */
1770
    char           *debugLogFilename;         /* [in/out] Optional. Specify 0 to ignore. Gives fmod's logging system a path/filename.  Normally the log is placed in the same directory as the executable and called fmod.log. When using System::getAdvancedSettings, provide at least 256 bytes of memory to copy into. */
1771
    unsigned short  profileport;              /* [in/out] Optional. Specify 0 to ignore. For use with FMOD_INIT_ENABLE_PROFILE.  Specify the port to listen on for connections by the profiler application. */
1772
} FMOD_ADVANCEDSETTINGS;
1773
1774
1775
/*
1776
[ENUM]
1777
[
1778
    [DESCRIPTION]
1779
    Special channel index values for FMOD functions.
1780
1781
    [REMARKS]
1782
    To get 'all' of the channels, use System::getMasterChannelGroup.
1783
1784
    [PLATFORMS]
1785
    Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone
1786
1787
    [SEE_ALSO]
1788
    System::playSound
1789
    System::playDSP
1790
    System::getChannel
1791
    System::getMasterChannelGroup
1792
]
1793
*/
1794
typedef enum
1795
{
1796
    FMOD_CHANNEL_FREE  = -1,      /* For a channel index, FMOD chooses a free voice using the priority system. */
1797
    FMOD_CHANNEL_REUSE = -2       /* For a channel index, re-use the channel handle that was passed in. */
1798
} FMOD_CHANNELINDEX;
1799
1800
#include "fmod_codec.h"
1801
#include "fmod_dsp.h"
1802
#include "fmod_memoryinfo.h"
1803
1804
/* ========================================================================================== */
1805
/* FUNCTION PROTOTYPES                                                                        */
1806
/* ========================================================================================== */
1807
1808
#ifdef __cplusplus
1809
extern "C" 
1810
{
1811
#endif
1812
1813
/*
1814
    FMOD global system functions (optional).
1815
*/
1816
1817
FMOD_RESULT F_API FMOD_Memory_Initialize           (void *poolmem, int poollen, FMOD_MEMORY_ALLOCCALLBACK useralloc, FMOD_MEMORY_REALLOCCALLBACK userrealloc, FMOD_MEMORY_FREECALLBACK userfree, FMOD_MEMORY_TYPE memtypeflags);
1818
FMOD_RESULT F_API FMOD_Memory_GetStats             (int *currentalloced, int *maxalloced);
1819
FMOD_RESULT F_API FMOD_Debug_SetLevel              (FMOD_DEBUGLEVEL level);
1820
FMOD_RESULT F_API FMOD_Debug_GetLevel              (FMOD_DEBUGLEVEL *level);
1821
FMOD_RESULT F_API FMOD_File_SetDiskBusy            (int busy);
1822
FMOD_RESULT F_API FMOD_File_GetDiskBusy            (int *busy);
1823
1824
/*
1825
    FMOD System factory functions.  Use this to create an FMOD System Instance.  below you will see FMOD_System_Init/Close to get started.
1826
*/
1827
1828
FMOD_RESULT F_API FMOD_System_Create               (FMOD_SYSTEM **system); 
1829
FMOD_RESULT F_API FMOD_System_Release              (FMOD_SYSTEM *system); 
1830
1831
/*$ preserve end $*/
1832
1833
/*
1834
    'System' API
1835
*/
1836
1837
/*
1838
     Pre-init functions.
1839
*/
1840
1841
FMOD_RESULT F_API FMOD_System_SetOutput              (FMOD_SYSTEM *system, FMOD_OUTPUTTYPE output);
1842
FMOD_RESULT F_API FMOD_System_GetOutput              (FMOD_SYSTEM *system, FMOD_OUTPUTTYPE *output);
1843
FMOD_RESULT F_API FMOD_System_GetNumDrivers          (FMOD_SYSTEM *system, int *numdrivers);
1844
FMOD_RESULT F_API FMOD_System_GetDriverInfo          (FMOD_SYSTEM *system, int id, char *name, int namelen, FMOD_GUID *guid);
1845
FMOD_RESULT F_API FMOD_System_GetDriverCaps          (FMOD_SYSTEM *system, int id, FMOD_CAPS *caps, int *minfrequency, int *maxfrequency, FMOD_SPEAKERMODE *controlpanelspeakermode);
1846
FMOD_RESULT F_API FMOD_System_SetDriver              (FMOD_SYSTEM *system, int driver);
1847
FMOD_RESULT F_API FMOD_System_GetDriver              (FMOD_SYSTEM *system, int *driver);
1848
FMOD_RESULT F_API FMOD_System_SetHardwareChannels    (FMOD_SYSTEM *system, int min2d, int max2d, int min3d, int max3d);
1849
FMOD_RESULT F_API FMOD_System_SetSoftwareChannels    (FMOD_SYSTEM *system, int numsoftwarechannels);
1850
FMOD_RESULT F_API FMOD_System_GetSoftwareChannels    (FMOD_SYSTEM *system, int *numsoftwarechannels);
1851
FMOD_RESULT F_API FMOD_System_SetSoftwareFormat      (FMOD_SYSTEM *system, int samplerate, FMOD_SOUND_FORMAT format, int numoutputchannels, int maxinputchannels, FMOD_DSP_RESAMPLER resamplemethod);
1852
FMOD_RESULT F_API FMOD_System_GetSoftwareFormat      (FMOD_SYSTEM *system, int *samplerate, FMOD_SOUND_FORMAT *format, int *numoutputchannels, int *maxinputchannels, FMOD_DSP_RESAMPLER *resamplemethod, int *bits);
1853
FMOD_RESULT F_API FMOD_System_SetDSPBufferSize       (FMOD_SYSTEM *system, unsigned int bufferlength, int numbuffers);
1854
FMOD_RESULT F_API FMOD_System_GetDSPBufferSize       (FMOD_SYSTEM *system, unsigned int *bufferlength, int *numbuffers);
1855
FMOD_RESULT F_API FMOD_System_SetFileSystem          (FMOD_SYSTEM *system, FMOD_FILE_OPENCALLBACK useropen, FMOD_FILE_CLOSECALLBACK userclose, FMOD_FILE_READCALLBACK userread, FMOD_FILE_SEEKCALLBACK userseek, int blockalign);
1856
FMOD_RESULT F_API FMOD_System_AttachFileSystem       (FMOD_SYSTEM *system, FMOD_FILE_OPENCALLBACK useropen, FMOD_FILE_CLOSECALLBACK userclose, FMOD_FILE_READCALLBACK userread, FMOD_FILE_SEEKCALLBACK userseek);
1857
FMOD_RESULT F_API FMOD_System_SetAdvancedSettings    (FMOD_SYSTEM *system, FMOD_ADVANCEDSETTINGS *settings);
1858
FMOD_RESULT F_API FMOD_System_GetAdvancedSettings    (FMOD_SYSTEM *system, FMOD_ADVANCEDSETTINGS *settings);
1859
FMOD_RESULT F_API FMOD_System_SetSpeakerMode         (FMOD_SYSTEM *system, FMOD_SPEAKERMODE speakermode);
1860
FMOD_RESULT F_API FMOD_System_GetSpeakerMode         (FMOD_SYSTEM *system, FMOD_SPEAKERMODE *speakermode);
1861
FMOD_RESULT F_API FMOD_System_SetCallback            (FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK callback);
1862
1863
/*
1864
     Plug-in support                       
1865
*/
1866
1867
FMOD_RESULT F_API FMOD_System_SetPluginPath          (FMOD_SYSTEM *system, const char *path);
1868
FMOD_RESULT F_API FMOD_System_LoadPlugin             (FMOD_SYSTEM *system, const char *filename, unsigned int *handle, unsigned int priority);
1869
FMOD_RESULT F_API FMOD_System_UnloadPlugin           (FMOD_SYSTEM *system, unsigned int handle);
1870
FMOD_RESULT F_API FMOD_System_GetNumPlugins          (FMOD_SYSTEM *system, FMOD_PLUGINTYPE plugintype, int *numplugins);
1871
FMOD_RESULT F_API FMOD_System_GetPluginHandle        (FMOD_SYSTEM *system, FMOD_PLUGINTYPE plugintype, int index, unsigned int *handle);
1872
FMOD_RESULT F_API FMOD_System_GetPluginInfo          (FMOD_SYSTEM *system, unsigned int handle, FMOD_PLUGINTYPE *plugintype, char *name, int namelen, unsigned int *version);
1873
FMOD_RESULT F_API FMOD_System_SetOutputByPlugin      (FMOD_SYSTEM *system, unsigned int handle);
1874
FMOD_RESULT F_API FMOD_System_GetOutputByPlugin      (FMOD_SYSTEM *system, unsigned int *handle);
1875
FMOD_RESULT F_API FMOD_System_CreateDSPByPlugin      (FMOD_SYSTEM *system, unsigned int handle, FMOD_DSP **dsp);
1876
FMOD_RESULT F_API FMOD_System_CreateCodec            (FMOD_SYSTEM *system, FMOD_CODEC_DESCRIPTION *description, unsigned int priority);
1877
1878
/*
1879
     Init/Close                            
1880
*/
1881
1882
FMOD_RESULT F_API FMOD_System_Init                   (FMOD_SYSTEM *system, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata);
1883
FMOD_RESULT F_API FMOD_System_Close                  (FMOD_SYSTEM *system);
1884
1885
/*
1886
     General post-init system functions    
1887
*/
1888
1889
FMOD_RESULT F_API FMOD_System_Update                 (FMOD_SYSTEM *system);
1890
1891
FMOD_RESULT F_API FMOD_System_Set3DSettings          (FMOD_SYSTEM *system, float dopplerscale, float distancefactor, float rolloffscale);
1892
FMOD_RESULT F_API FMOD_System_Get3DSettings          (FMOD_SYSTEM *system, float *dopplerscale, float *distancefactor, float *rolloffscale);
1893
FMOD_RESULT F_API FMOD_System_Set3DNumListeners      (FMOD_SYSTEM *system, int numlisteners);
1894
FMOD_RESULT F_API FMOD_System_Get3DNumListeners      (FMOD_SYSTEM *system, int *numlisteners);
1895
FMOD_RESULT F_API FMOD_System_Set3DListenerAttributes(FMOD_SYSTEM *system, int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
1896
FMOD_RESULT F_API FMOD_System_Get3DListenerAttributes(FMOD_SYSTEM *system, int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up);
1897
FMOD_RESULT F_API FMOD_System_Set3DRolloffCallback   (FMOD_SYSTEM *system, FMOD_3D_ROLLOFFCALLBACK callback);
1898
FMOD_RESULT F_API FMOD_System_Set3DSpeakerPosition   (FMOD_SYSTEM *system, FMOD_SPEAKER speaker, float x, float y, FMOD_BOOL active);
1899
FMOD_RESULT F_API FMOD_System_Get3DSpeakerPosition   (FMOD_SYSTEM *system, FMOD_SPEAKER speaker, float *x, float *y, FMOD_BOOL *active);
1900
1901
FMOD_RESULT F_API FMOD_System_SetStreamBufferSize    (FMOD_SYSTEM *system, unsigned int filebuffersize, FMOD_TIMEUNIT filebuffersizetype);
1902
FMOD_RESULT F_API FMOD_System_GetStreamBufferSize    (FMOD_SYSTEM *system, unsigned int *filebuffersize, FMOD_TIMEUNIT *filebuffersizetype);
1903
1904
/*
1905
     System information functions.        
1906
*/
1907
1908
FMOD_RESULT F_API FMOD_System_GetVersion             (FMOD_SYSTEM *system, unsigned int *version);
1909
FMOD_RESULT F_API FMOD_System_GetOutputHandle        (FMOD_SYSTEM *system, void **handle);
1910
FMOD_RESULT F_API FMOD_System_GetChannelsPlaying     (FMOD_SYSTEM *system, int *channels);
1911
FMOD_RESULT F_API FMOD_System_GetHardwareChannels    (FMOD_SYSTEM *system, int *num2d, int *num3d, int *total);
1912
FMOD_RESULT F_API FMOD_System_GetCPUUsage            (FMOD_SYSTEM *system, float *dsp, float *stream, float *update, float *total);
1913
FMOD_RESULT F_API FMOD_System_GetSoundRAM            (FMOD_SYSTEM *system, int *currentalloced, int *maxalloced, int *total);
1914
FMOD_RESULT F_API FMOD_System_GetNumCDROMDrives      (FMOD_SYSTEM *system, int *numdrives);
1915
FMOD_RESULT F_API FMOD_System_GetCDROMDriveName      (FMOD_SYSTEM *system, int drive, char *drivename, int drivenamelen, char *scsiname, int scsinamelen, char *devicename, int devicenamelen);
1916
FMOD_RESULT F_API FMOD_System_GetSpectrum            (FMOD_SYSTEM *system, float *spectrumarray, int numvalues, int channeloffset, FMOD_DSP_FFT_WINDOW windowtype);
1917
FMOD_RESULT F_API FMOD_System_GetWaveData            (FMOD_SYSTEM *system, float *wavearray, int numvalues, int channeloffset);
1918
1919
/*
1920
     Sound/DSP/Channel/FX creation and retrieval.       
1921
*/
1922
1923
FMOD_RESULT F_API FMOD_System_CreateSound            (FMOD_SYSTEM *system, const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, FMOD_SOUND **sound);
1924
FMOD_RESULT F_API FMOD_System_CreateStream           (FMOD_SYSTEM *system, const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, FMOD_SOUND **sound);
1925
FMOD_RESULT F_API FMOD_System_CreateDSP              (FMOD_SYSTEM *system, FMOD_DSP_DESCRIPTION *description, FMOD_DSP **dsp);
1926
FMOD_RESULT F_API FMOD_System_CreateDSPByType        (FMOD_SYSTEM *system, FMOD_DSP_TYPE type, FMOD_DSP **dsp);
1927
FMOD_RESULT F_API FMOD_System_CreateChannelGroup     (FMOD_SYSTEM *system, const char *name, FMOD_CHANNELGROUP **channelgroup);
1928
FMOD_RESULT F_API FMOD_System_CreateSoundGroup       (FMOD_SYSTEM *system, const char *name, FMOD_SOUNDGROUP **soundgroup);
1929
FMOD_RESULT F_API FMOD_System_CreateReverb           (FMOD_SYSTEM *system, FMOD_REVERB **reverb);
1930
1931
FMOD_RESULT F_API FMOD_System_PlaySound              (FMOD_SYSTEM *system, FMOD_CHANNELINDEX channelid, FMOD_SOUND *sound, FMOD_BOOL paused, FMOD_CHANNEL **channel);
1932
FMOD_RESULT F_API FMOD_System_PlayDSP                (FMOD_SYSTEM *system, FMOD_CHANNELINDEX channelid, FMOD_DSP *dsp, FMOD_BOOL paused, FMOD_CHANNEL **channel);
1933
FMOD_RESULT F_API FMOD_System_GetChannel             (FMOD_SYSTEM *system, int channelid, FMOD_CHANNEL **channel);
1934
FMOD_RESULT F_API FMOD_System_GetMasterChannelGroup  (FMOD_SYSTEM *system, FMOD_CHANNELGROUP **channelgroup);
1935
FMOD_RESULT F_API FMOD_System_GetMasterSoundGroup    (FMOD_SYSTEM *system, FMOD_SOUNDGROUP **soundgroup);
1936
1937
/*
1938
     Reverb API                           
1939
*/
1940
1941
FMOD_RESULT F_API FMOD_System_SetReverbProperties    (FMOD_SYSTEM *system, const FMOD_REVERB_PROPERTIES *prop);
1942
FMOD_RESULT F_API FMOD_System_GetReverbProperties    (FMOD_SYSTEM *system, FMOD_REVERB_PROPERTIES *prop);
1943
FMOD_RESULT F_API FMOD_System_SetReverbAmbientProperties(FMOD_SYSTEM *system, FMOD_REVERB_PROPERTIES *prop);
1944
FMOD_RESULT F_API FMOD_System_GetReverbAmbientProperties(FMOD_SYSTEM *system, FMOD_REVERB_PROPERTIES *prop);
1945
1946
/*
1947
     System level DSP access.
1948
*/
1949
1950
FMOD_RESULT F_API FMOD_System_GetDSPHead             (FMOD_SYSTEM *system, FMOD_DSP **dsp);
1951
FMOD_RESULT F_API FMOD_System_AddDSP                 (FMOD_SYSTEM *system, FMOD_DSP *dsp, FMOD_DSPCONNECTION **connection);
1952
FMOD_RESULT F_API FMOD_System_LockDSP                (FMOD_SYSTEM *system);
1953
FMOD_RESULT F_API FMOD_System_UnlockDSP              (FMOD_SYSTEM *system);
1954
FMOD_RESULT F_API FMOD_System_GetDSPClock            (FMOD_SYSTEM *system, unsigned int *hi, unsigned int *lo);
1955
1956
/*
1957
     Recording API.
1958
*/
1959
1960
FMOD_RESULT F_API FMOD_System_GetRecordNumDrivers    (FMOD_SYSTEM *system, int *numdrivers);
1961
FMOD_RESULT F_API FMOD_System_GetRecordDriverInfo    (FMOD_SYSTEM *system, int id, char *name, int namelen, FMOD_GUID *guid);
1962
FMOD_RESULT F_API FMOD_System_GetRecordDriverCaps    (FMOD_SYSTEM *system, int id, FMOD_CAPS *caps, int *minfrequency, int *maxfrequency);
1963
FMOD_RESULT F_API FMOD_System_GetRecordPosition      (FMOD_SYSTEM *system, int id, unsigned int *position);
1964
1965
FMOD_RESULT F_API FMOD_System_RecordStart            (FMOD_SYSTEM *system, int id, FMOD_SOUND *sound, FMOD_BOOL loop);
1966
FMOD_RESULT F_API FMOD_System_RecordStop             (FMOD_SYSTEM *system, int id);
1967
FMOD_RESULT F_API FMOD_System_IsRecording            (FMOD_SYSTEM *system, int id, FMOD_BOOL *recording);
1968
1969
/*
1970
     Geometry API.
1971
*/
1972
1973
FMOD_RESULT F_API FMOD_System_CreateGeometry         (FMOD_SYSTEM *system, int maxpolygons, int maxvertices, FMOD_GEOMETRY **geometry);
1974
FMOD_RESULT F_API FMOD_System_SetGeometrySettings    (FMOD_SYSTEM *system, float maxworldsize);
1975
FMOD_RESULT F_API FMOD_System_GetGeometrySettings    (FMOD_SYSTEM *system, float *maxworldsize);
1976
FMOD_RESULT F_API FMOD_System_LoadGeometry           (FMOD_SYSTEM *system, const void *data, int datasize, FMOD_GEOMETRY **geometry);
1977
FMOD_RESULT F_API FMOD_System_GetGeometryOcclusion   (FMOD_SYSTEM *system, const FMOD_VECTOR *listener, const FMOD_VECTOR *source, float *direct, float *reverb);
1978
1979
/*
1980
     Network functions.
1981
*/
1982
1983
FMOD_RESULT F_API FMOD_System_SetNetworkProxy        (FMOD_SYSTEM *system, const char *proxy);
1984
FMOD_RESULT F_API FMOD_System_GetNetworkProxy        (FMOD_SYSTEM *system, char *proxy, int proxylen);
1985
FMOD_RESULT F_API FMOD_System_SetNetworkTimeout      (FMOD_SYSTEM *system, int timeout);
1986
FMOD_RESULT F_API FMOD_System_GetNetworkTimeout      (FMOD_SYSTEM *system, int *timeout);
1987
1988
/*
1989
     Userdata set/get.
1990
*/
1991
1992
FMOD_RESULT F_API FMOD_System_SetUserData            (FMOD_SYSTEM *system, void *userdata);
1993
FMOD_RESULT F_API FMOD_System_GetUserData            (FMOD_SYSTEM *system, void **userdata);
1994
1995
FMOD_RESULT F_API FMOD_System_GetMemoryInfo          (FMOD_SYSTEM *system, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
1996
1997
/*
1998
    'Sound' API
1999
*/
2000
2001
FMOD_RESULT F_API FMOD_Sound_Release                 (FMOD_SOUND *sound);
2002
FMOD_RESULT F_API FMOD_Sound_GetSystemObject         (FMOD_SOUND *sound, FMOD_SYSTEM **system);
2003
2004
/*
2005
     Standard sound manipulation functions.                                                
2006
*/
2007
2008
FMOD_RESULT F_API FMOD_Sound_Lock                    (FMOD_SOUND *sound, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
2009
FMOD_RESULT F_API FMOD_Sound_Unlock                  (FMOD_SOUND *sound, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
2010
FMOD_RESULT F_API FMOD_Sound_SetDefaults             (FMOD_SOUND *sound, float frequency, float volume, float pan, int priority);
2011
FMOD_RESULT F_API FMOD_Sound_GetDefaults             (FMOD_SOUND *sound, float *frequency, float *volume, float *pan, int *priority);
2012
FMOD_RESULT F_API FMOD_Sound_SetVariations           (FMOD_SOUND *sound, float frequencyvar, float volumevar, float panvar);
2013
FMOD_RESULT F_API FMOD_Sound_GetVariations           (FMOD_SOUND *sound, float *frequencyvar, float *volumevar, float *panvar);
2014
FMOD_RESULT F_API FMOD_Sound_Set3DMinMaxDistance     (FMOD_SOUND *sound, float min, float max);
2015
FMOD_RESULT F_API FMOD_Sound_Get3DMinMaxDistance     (FMOD_SOUND *sound, float *min, float *max);
2016
FMOD_RESULT F_API FMOD_Sound_Set3DConeSettings       (FMOD_SOUND *sound, float insideconeangle, float outsideconeangle, float outsidevolume);
2017
FMOD_RESULT F_API FMOD_Sound_Get3DConeSettings       (FMOD_SOUND *sound, float *insideconeangle, float *outsideconeangle, float *outsidevolume);
2018
FMOD_RESULT F_API FMOD_Sound_Set3DCustomRolloff      (FMOD_SOUND *sound, FMOD_VECTOR *points, int numpoints);
2019
FMOD_RESULT F_API FMOD_Sound_Get3DCustomRolloff      (FMOD_SOUND *sound, FMOD_VECTOR **points, int *numpoints);
2020
FMOD_RESULT F_API FMOD_Sound_SetSubSound             (FMOD_SOUND *sound, int index, FMOD_SOUND *subsound);
2021
FMOD_RESULT F_API FMOD_Sound_GetSubSound             (FMOD_SOUND *sound, int index, FMOD_SOUND **subsound);
2022
FMOD_RESULT F_API FMOD_Sound_SetSubSoundSentence     (FMOD_SOUND *sound, int *subsoundlist, int numsubsounds);
2023
FMOD_RESULT F_API FMOD_Sound_GetName                 (FMOD_SOUND *sound, char *name, int namelen);
2024
FMOD_RESULT F_API FMOD_Sound_GetLength               (FMOD_SOUND *sound, unsigned int *length, FMOD_TIMEUNIT lengthtype);
2025
FMOD_RESULT F_API FMOD_Sound_GetFormat               (FMOD_SOUND *sound, FMOD_SOUND_TYPE *type, FMOD_SOUND_FORMAT *format, int *channels, int *bits);
2026
FMOD_RESULT F_API FMOD_Sound_GetNumSubSounds         (FMOD_SOUND *sound, int *numsubsounds);
2027
FMOD_RESULT F_API FMOD_Sound_GetNumTags              (FMOD_SOUND *sound, int *numtags, int *numtagsupdated);
2028
FMOD_RESULT F_API FMOD_Sound_GetTag                  (FMOD_SOUND *sound, const char *name, int index, FMOD_TAG *tag);
2029
FMOD_RESULT F_API FMOD_Sound_GetOpenState            (FMOD_SOUND *sound, FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, FMOD_BOOL *starving);
2030
FMOD_RESULT F_API FMOD_Sound_ReadData                (FMOD_SOUND *sound, void *buffer, unsigned int lenbytes, unsigned int *read);
2031
FMOD_RESULT F_API FMOD_Sound_SeekData                (FMOD_SOUND *sound, unsigned int pcm);
2032
2033
FMOD_RESULT F_API FMOD_Sound_SetSoundGroup           (FMOD_SOUND *sound, FMOD_SOUNDGROUP *soundgroup);
2034
FMOD_RESULT F_API FMOD_Sound_GetSoundGroup           (FMOD_SOUND *sound, FMOD_SOUNDGROUP **soundgroup);
2035
2036
/*
2037
     Synchronization point API.  These points can come from markers embedded in wav files, and can also generate channel callbacks.        
2038
*/
2039
2040
FMOD_RESULT F_API FMOD_Sound_GetNumSyncPoints        (FMOD_SOUND *sound, int *numsyncpoints);
2041
FMOD_RESULT F_API FMOD_Sound_GetSyncPoint            (FMOD_SOUND *sound, int index, FMOD_SYNCPOINT **point);
2042
FMOD_RESULT F_API FMOD_Sound_GetSyncPointInfo        (FMOD_SOUND *sound, FMOD_SYNCPOINT *point, char *name, int namelen, unsigned int *offset, FMOD_TIMEUNIT offsettype);
2043
FMOD_RESULT F_API FMOD_Sound_AddSyncPoint            (FMOD_SOUND *sound, unsigned int offset, FMOD_TIMEUNIT offsettype, const char *name, FMOD_SYNCPOINT **point);
2044
FMOD_RESULT F_API FMOD_Sound_DeleteSyncPoint         (FMOD_SOUND *sound, FMOD_SYNCPOINT *point);
2045
2046
/*
2047
     Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time.
2048
*/
2049
2050
FMOD_RESULT F_API FMOD_Sound_SetMode                 (FMOD_SOUND *sound, FMOD_MODE mode);
2051
FMOD_RESULT F_API FMOD_Sound_GetMode                 (FMOD_SOUND *sound, FMOD_MODE *mode);
2052
FMOD_RESULT F_API FMOD_Sound_SetLoopCount            (FMOD_SOUND *sound, int loopcount);
2053
FMOD_RESULT F_API FMOD_Sound_GetLoopCount            (FMOD_SOUND *sound, int *loopcount);
2054
FMOD_RESULT F_API FMOD_Sound_SetLoopPoints           (FMOD_SOUND *sound, unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
2055
FMOD_RESULT F_API FMOD_Sound_GetLoopPoints           (FMOD_SOUND *sound, unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
2056
2057
/*
2058
     For MOD/S3M/XM/IT/MID sequenced formats only.
2059
*/
2060
2061
FMOD_RESULT F_API FMOD_Sound_GetMusicNumChannels     (FMOD_SOUND *sound, int *numchannels);
2062
FMOD_RESULT F_API FMOD_Sound_SetMusicChannelVolume   (FMOD_SOUND *sound, int channel, float volume);
2063
FMOD_RESULT F_API FMOD_Sound_GetMusicChannelVolume   (FMOD_SOUND *sound, int channel, float *volume);
2064
2065
/*
2066
     Userdata set/get.
2067
*/
2068
2069
FMOD_RESULT F_API FMOD_Sound_SetUserData             (FMOD_SOUND *sound, void *userdata);
2070
FMOD_RESULT F_API FMOD_Sound_GetUserData             (FMOD_SOUND *sound, void **userdata);
2071
2072
FMOD_RESULT F_API FMOD_Sound_GetMemoryInfo           (FMOD_SOUND *sound, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2073
2074
/*
2075
    'Channel' API
2076
*/
2077
2078
FMOD_RESULT F_API FMOD_Channel_GetSystemObject       (FMOD_CHANNEL *channel, FMOD_SYSTEM **system);
2079
2080
FMOD_RESULT F_API FMOD_Channel_Stop                  (FMOD_CHANNEL *channel);
2081
FMOD_RESULT F_API FMOD_Channel_SetPaused             (FMOD_CHANNEL *channel, FMOD_BOOL paused);
2082
FMOD_RESULT F_API FMOD_Channel_GetPaused             (FMOD_CHANNEL *channel, FMOD_BOOL *paused);
2083
FMOD_RESULT F_API FMOD_Channel_SetVolume             (FMOD_CHANNEL *channel, float volume);
2084
FMOD_RESULT F_API FMOD_Channel_GetVolume             (FMOD_CHANNEL *channel, float *volume);
2085
FMOD_RESULT F_API FMOD_Channel_SetFrequency          (FMOD_CHANNEL *channel, float frequency);
2086
FMOD_RESULT F_API FMOD_Channel_GetFrequency          (FMOD_CHANNEL *channel, float *frequency);
2087
FMOD_RESULT F_API FMOD_Channel_SetPan                (FMOD_CHANNEL *channel, float pan);
2088
FMOD_RESULT F_API FMOD_Channel_GetPan                (FMOD_CHANNEL *channel, float *pan);
2089
FMOD_RESULT F_API FMOD_Channel_SetDelay              (FMOD_CHANNEL *channel, FMOD_DELAYTYPE delaytype, unsigned int delayhi, unsigned int delaylo);
2090
FMOD_RESULT F_API FMOD_Channel_GetDelay              (FMOD_CHANNEL *channel, FMOD_DELAYTYPE delaytype, unsigned int *delayhi, unsigned int *delaylo);
2091
FMOD_RESULT F_API FMOD_Channel_SetSpeakerMix         (FMOD_CHANNEL *channel, float frontleft, float frontright, float center, float lfe, float backleft, float backright, float sideleft, float sideright);
2092
FMOD_RESULT F_API FMOD_Channel_GetSpeakerMix         (FMOD_CHANNEL *channel, float *frontleft, float *frontright, float *center, float *lfe, float *backleft, float *backright, float *sideleft, float *sideright);
2093
FMOD_RESULT F_API FMOD_Channel_SetSpeakerLevels      (FMOD_CHANNEL *channel, FMOD_SPEAKER speaker, float *levels, int numlevels);
2094
FMOD_RESULT F_API FMOD_Channel_GetSpeakerLevels      (FMOD_CHANNEL *channel, FMOD_SPEAKER speaker, float *levels, int numlevels);
2095
FMOD_RESULT F_API FMOD_Channel_SetInputChannelMix    (FMOD_CHANNEL *channel, float *levels, int numlevels);
2096
FMOD_RESULT F_API FMOD_Channel_GetInputChannelMix    (FMOD_CHANNEL *channel, float *levels, int numlevels);
2097
FMOD_RESULT F_API FMOD_Channel_SetMute               (FMOD_CHANNEL *channel, FMOD_BOOL mute);
2098
FMOD_RESULT F_API FMOD_Channel_GetMute               (FMOD_CHANNEL *channel, FMOD_BOOL *mute);
2099
FMOD_RESULT F_API FMOD_Channel_SetPriority           (FMOD_CHANNEL *channel, int priority);
2100
FMOD_RESULT F_API FMOD_Channel_GetPriority           (FMOD_CHANNEL *channel, int *priority);
2101
FMOD_RESULT F_API FMOD_Channel_SetPosition           (FMOD_CHANNEL *channel, unsigned int position, FMOD_TIMEUNIT postype);
2102
FMOD_RESULT F_API FMOD_Channel_GetPosition           (FMOD_CHANNEL *channel, unsigned int *position, FMOD_TIMEUNIT postype);
2103
FMOD_RESULT F_API FMOD_Channel_SetReverbProperties   (FMOD_CHANNEL *channel, const FMOD_REVERB_CHANNELPROPERTIES *prop);
2104
FMOD_RESULT F_API FMOD_Channel_GetReverbProperties   (FMOD_CHANNEL *channel, FMOD_REVERB_CHANNELPROPERTIES *prop);
2105
FMOD_RESULT F_API FMOD_Channel_SetLowPassGain        (FMOD_CHANNEL *channel, float gain);
2106
FMOD_RESULT F_API FMOD_Channel_GetLowPassGain        (FMOD_CHANNEL *channel, float *gain);
2107
2108
FMOD_RESULT F_API FMOD_Channel_SetChannelGroup       (FMOD_CHANNEL *channel, FMOD_CHANNELGROUP *channelgroup);
2109
FMOD_RESULT F_API FMOD_Channel_GetChannelGroup       (FMOD_CHANNEL *channel, FMOD_CHANNELGROUP **channelgroup);
2110
FMOD_RESULT F_API FMOD_Channel_SetCallback           (FMOD_CHANNEL *channel, FMOD_CHANNEL_CALLBACK callback);
2111
2112
/*
2113
     3D functionality.
2114
*/
2115
2116
FMOD_RESULT F_API FMOD_Channel_Set3DAttributes       (FMOD_CHANNEL *channel, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel);
2117
FMOD_RESULT F_API FMOD_Channel_Get3DAttributes       (FMOD_CHANNEL *channel, FMOD_VECTOR *pos, FMOD_VECTOR *vel);
2118
FMOD_RESULT F_API FMOD_Channel_Set3DMinMaxDistance   (FMOD_CHANNEL *channel, float mindistance, float maxdistance);
2119
FMOD_RESULT F_API FMOD_Channel_Get3DMinMaxDistance   (FMOD_CHANNEL *channel, float *mindistance, float *maxdistance);
2120
FMOD_RESULT F_API FMOD_Channel_Set3DConeSettings     (FMOD_CHANNEL *channel, float insideconeangle, float outsideconeangle, float outsidevolume);
2121
FMOD_RESULT F_API FMOD_Channel_Get3DConeSettings     (FMOD_CHANNEL *channel, float *insideconeangle, float *outsideconeangle, float *outsidevolume);
2122
FMOD_RESULT F_API FMOD_Channel_Set3DConeOrientation  (FMOD_CHANNEL *channel, FMOD_VECTOR *orientation);
2123
FMOD_RESULT F_API FMOD_Channel_Get3DConeOrientation  (FMOD_CHANNEL *channel, FMOD_VECTOR *orientation);
2124
FMOD_RESULT F_API FMOD_Channel_Set3DCustomRolloff    (FMOD_CHANNEL *channel, FMOD_VECTOR *points, int numpoints);
2125
FMOD_RESULT F_API FMOD_Channel_Get3DCustomRolloff    (FMOD_CHANNEL *channel, FMOD_VECTOR **points, int *numpoints);
2126
FMOD_RESULT F_API FMOD_Channel_Set3DOcclusion        (FMOD_CHANNEL *channel, float directocclusion, float reverbocclusion);
2127
FMOD_RESULT F_API FMOD_Channel_Get3DOcclusion        (FMOD_CHANNEL *channel, float *directocclusion, float *reverbocclusion);
2128
FMOD_RESULT F_API FMOD_Channel_Set3DSpread           (FMOD_CHANNEL *channel, float angle);
2129
FMOD_RESULT F_API FMOD_Channel_Get3DSpread           (FMOD_CHANNEL *channel, float *angle);
2130
FMOD_RESULT F_API FMOD_Channel_Set3DPanLevel         (FMOD_CHANNEL *channel, float level);
2131
FMOD_RESULT F_API FMOD_Channel_Get3DPanLevel         (FMOD_CHANNEL *channel, float *level);
2132
FMOD_RESULT F_API FMOD_Channel_Set3DDopplerLevel     (FMOD_CHANNEL *channel, float level);
2133
FMOD_RESULT F_API FMOD_Channel_Get3DDopplerLevel     (FMOD_CHANNEL *channel, float *level);
2134
2135
/*
2136
     DSP functionality only for channels playing sounds created with FMOD_SOFTWARE.
2137
*/
2138
2139
FMOD_RESULT F_API FMOD_Channel_GetDSPHead            (FMOD_CHANNEL *channel, FMOD_DSP **dsp);
2140
FMOD_RESULT F_API FMOD_Channel_AddDSP                (FMOD_CHANNEL *channel, FMOD_DSP *dsp, FMOD_DSPCONNECTION **connection);
2141
2142
/*
2143
     Information only functions.
2144
*/
2145
2146
FMOD_RESULT F_API FMOD_Channel_IsPlaying             (FMOD_CHANNEL *channel, FMOD_BOOL *isplaying);
2147
FMOD_RESULT F_API FMOD_Channel_IsVirtual             (FMOD_CHANNEL *channel, FMOD_BOOL *isvirtual);
2148
FMOD_RESULT F_API FMOD_Channel_GetAudibility         (FMOD_CHANNEL *channel, float *audibility);
2149
FMOD_RESULT F_API FMOD_Channel_GetCurrentSound       (FMOD_CHANNEL *channel, FMOD_SOUND **sound);
2150
FMOD_RESULT F_API FMOD_Channel_GetSpectrum           (FMOD_CHANNEL *channel, float *spectrumarray, int numvalues, int channeloffset, FMOD_DSP_FFT_WINDOW windowtype);
2151
FMOD_RESULT F_API FMOD_Channel_GetWaveData           (FMOD_CHANNEL *channel, float *wavearray, int numvalues, int channeloffset);
2152
FMOD_RESULT F_API FMOD_Channel_GetIndex              (FMOD_CHANNEL *channel, int *index);
2153
2154
/*
2155
     Functions also found in Sound class but here they can be set per channel.
2156
*/
2157
2158
FMOD_RESULT F_API FMOD_Channel_SetMode               (FMOD_CHANNEL *channel, FMOD_MODE mode);
2159
FMOD_RESULT F_API FMOD_Channel_GetMode               (FMOD_CHANNEL *channel, FMOD_MODE *mode);
2160
FMOD_RESULT F_API FMOD_Channel_SetLoopCount          (FMOD_CHANNEL *channel, int loopcount);
2161
FMOD_RESULT F_API FMOD_Channel_GetLoopCount          (FMOD_CHANNEL *channel, int *loopcount);
2162
FMOD_RESULT F_API FMOD_Channel_SetLoopPoints         (FMOD_CHANNEL *channel, unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
2163
FMOD_RESULT F_API FMOD_Channel_GetLoopPoints         (FMOD_CHANNEL *channel, unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
2164
2165
/*
2166
     Userdata set/get.                                                
2167
*/
2168
2169
FMOD_RESULT F_API FMOD_Channel_SetUserData           (FMOD_CHANNEL *channel, void *userdata);
2170
FMOD_RESULT F_API FMOD_Channel_GetUserData           (FMOD_CHANNEL *channel, void **userdata);
2171
2172
FMOD_RESULT F_API FMOD_Channel_GetMemoryInfo         (FMOD_CHANNEL *channel, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2173
2174
/*
2175
    'ChannelGroup' API
2176
*/
2177
2178
FMOD_RESULT F_API FMOD_ChannelGroup_Release          (FMOD_CHANNELGROUP *channelgroup);
2179
FMOD_RESULT F_API FMOD_ChannelGroup_GetSystemObject  (FMOD_CHANNELGROUP *channelgroup, FMOD_SYSTEM **system);
2180
2181
/*
2182
     Channelgroup scale values.  (changes attributes relative to the channels, doesn't overwrite them)
2183
*/
2184
2185
FMOD_RESULT F_API FMOD_ChannelGroup_SetVolume        (FMOD_CHANNELGROUP *channelgroup, float volume);
2186
FMOD_RESULT F_API FMOD_ChannelGroup_GetVolume        (FMOD_CHANNELGROUP *channelgroup, float *volume);
2187
FMOD_RESULT F_API FMOD_ChannelGroup_SetPitch         (FMOD_CHANNELGROUP *channelgroup, float pitch);
2188
FMOD_RESULT F_API FMOD_ChannelGroup_GetPitch         (FMOD_CHANNELGROUP *channelgroup, float *pitch);
2189
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DOcclusion   (FMOD_CHANNELGROUP *channelgroup, float directocclusion, float reverbocclusion);
2190
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DOcclusion   (FMOD_CHANNELGROUP *channelgroup, float *directocclusion, float *reverbocclusion);
2191
FMOD_RESULT F_API FMOD_ChannelGroup_SetPaused        (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL paused);
2192
FMOD_RESULT F_API FMOD_ChannelGroup_GetPaused        (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *paused);
2193
FMOD_RESULT F_API FMOD_ChannelGroup_SetMute          (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL mute);
2194
FMOD_RESULT F_API FMOD_ChannelGroup_GetMute          (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *mute);
2195
2196
/*
2197
     Channelgroup override values.  (recursively overwrites whatever settings the channels had)
2198
*/
2199
2200
FMOD_RESULT F_API FMOD_ChannelGroup_Stop             (FMOD_CHANNELGROUP *channelgroup);
2201
FMOD_RESULT F_API FMOD_ChannelGroup_OverrideVolume   (FMOD_CHANNELGROUP *channelgroup, float volume);
2202
FMOD_RESULT F_API FMOD_ChannelGroup_OverrideFrequency(FMOD_CHANNELGROUP *channelgroup, float frequency);
2203
FMOD_RESULT F_API FMOD_ChannelGroup_OverridePan      (FMOD_CHANNELGROUP *channelgroup, float pan);
2204
FMOD_RESULT F_API FMOD_ChannelGroup_OverrideReverbProperties(FMOD_CHANNELGROUP *channelgroup, const FMOD_REVERB_CHANNELPROPERTIES *prop);
2205
FMOD_RESULT F_API FMOD_ChannelGroup_Override3DAttributes(FMOD_CHANNELGROUP *channelgroup, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel);
2206
FMOD_RESULT F_API FMOD_ChannelGroup_OverrideSpeakerMix(FMOD_CHANNELGROUP *channelgroup, float frontleft, float frontright, float center, float lfe, float backleft, float backright, float sideleft, float sideright);
2207
2208
/*
2209
     Nested channel groups.
2210
*/
2211
2212
FMOD_RESULT F_API FMOD_ChannelGroup_AddGroup         (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELGROUP *group);
2213
FMOD_RESULT F_API FMOD_ChannelGroup_GetNumGroups     (FMOD_CHANNELGROUP *channelgroup, int *numgroups);
2214
FMOD_RESULT F_API FMOD_ChannelGroup_GetGroup         (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_CHANNELGROUP **group);
2215
FMOD_RESULT F_API FMOD_ChannelGroup_GetParentGroup   (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELGROUP **group);
2216
2217
/*
2218
     DSP functionality only for channel groups playing sounds created with FMOD_SOFTWARE.
2219
*/
2220
2221
FMOD_RESULT F_API FMOD_ChannelGroup_GetDSPHead       (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP **dsp);
2222
FMOD_RESULT F_API FMOD_ChannelGroup_AddDSP           (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP *dsp, FMOD_DSPCONNECTION **connection);
2223
2224
/*
2225
     Information only functions.
2226
*/
2227
2228
FMOD_RESULT F_API FMOD_ChannelGroup_GetName          (FMOD_CHANNELGROUP *channelgroup, char *name, int namelen);
2229
FMOD_RESULT F_API FMOD_ChannelGroup_GetNumChannels   (FMOD_CHANNELGROUP *channelgroup, int *numchannels);
2230
FMOD_RESULT F_API FMOD_ChannelGroup_GetChannel       (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_CHANNEL **channel);
2231
FMOD_RESULT F_API FMOD_ChannelGroup_GetSpectrum      (FMOD_CHANNELGROUP *channelgroup, float *spectrumarray, int numvalues, int channeloffset, FMOD_DSP_FFT_WINDOW windowtype);
2232
FMOD_RESULT F_API FMOD_ChannelGroup_GetWaveData      (FMOD_CHANNELGROUP *channelgroup, float *wavearray, int numvalues, int channeloffset);
2233
2234
/*
2235
     Userdata set/get.
2236
*/
2237
2238
FMOD_RESULT F_API FMOD_ChannelGroup_SetUserData      (FMOD_CHANNELGROUP *channelgroup, void *userdata);
2239
FMOD_RESULT F_API FMOD_ChannelGroup_GetUserData      (FMOD_CHANNELGROUP *channelgroup, void **userdata);
2240
2241
FMOD_RESULT F_API FMOD_ChannelGroup_GetMemoryInfo    (FMOD_CHANNELGROUP *channelgroup, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2242
2243
/*
2244
    'SoundGroup' API
2245
*/
2246
2247
FMOD_RESULT F_API FMOD_SoundGroup_Release            (FMOD_SOUNDGROUP *soundgroup);
2248
FMOD_RESULT F_API FMOD_SoundGroup_GetSystemObject    (FMOD_SOUNDGROUP *soundgroup, FMOD_SYSTEM **system);
2249
2250
/*
2251
     SoundGroup control functions.
2252
*/
2253
2254
FMOD_RESULT F_API FMOD_SoundGroup_SetMaxAudible      (FMOD_SOUNDGROUP *soundgroup, int maxaudible);
2255
FMOD_RESULT F_API FMOD_SoundGroup_GetMaxAudible      (FMOD_SOUNDGROUP *soundgroup, int *maxaudible);
2256
FMOD_RESULT F_API FMOD_SoundGroup_SetMaxAudibleBehavior(FMOD_SOUNDGROUP *soundgroup, FMOD_SOUNDGROUP_BEHAVIOR behavior);
2257
FMOD_RESULT F_API FMOD_SoundGroup_GetMaxAudibleBehavior(FMOD_SOUNDGROUP *soundgroup, FMOD_SOUNDGROUP_BEHAVIOR *behavior);
2258
FMOD_RESULT F_API FMOD_SoundGroup_SetMuteFadeSpeed   (FMOD_SOUNDGROUP *soundgroup, float speed);
2259
FMOD_RESULT F_API FMOD_SoundGroup_GetMuteFadeSpeed   (FMOD_SOUNDGROUP *soundgroup, float *speed);
2260
FMOD_RESULT F_API FMOD_SoundGroup_SetVolume          (FMOD_SOUNDGROUP *soundgroup, float volume);
2261
FMOD_RESULT F_API FMOD_SoundGroup_GetVolume          (FMOD_SOUNDGROUP *soundgroup, float *volume);
2262
FMOD_RESULT F_API FMOD_SoundGroup_Stop               (FMOD_SOUNDGROUP *soundgroup);
2263
2264
/*
2265
     Information only functions.
2266
*/
2267
2268
FMOD_RESULT F_API FMOD_SoundGroup_GetName            (FMOD_SOUNDGROUP *soundgroup, char *name, int namelen);
2269
FMOD_RESULT F_API FMOD_SoundGroup_GetNumSounds       (FMOD_SOUNDGROUP *soundgroup, int *numsounds);
2270
FMOD_RESULT F_API FMOD_SoundGroup_GetSound           (FMOD_SOUNDGROUP *soundgroup, int index, FMOD_SOUND **sound);
2271
FMOD_RESULT F_API FMOD_SoundGroup_GetNumPlaying      (FMOD_SOUNDGROUP *soundgroup, int *numplaying);
2272
2273
/*
2274
     Userdata set/get.
2275
*/
2276
2277
FMOD_RESULT F_API FMOD_SoundGroup_SetUserData        (FMOD_SOUNDGROUP *soundgroup, void *userdata);
2278
FMOD_RESULT F_API FMOD_SoundGroup_GetUserData        (FMOD_SOUNDGROUP *soundgroup, void **userdata);
2279
2280
FMOD_RESULT F_API FMOD_SoundGroup_GetMemoryInfo      (FMOD_SOUNDGROUP *soundgroup, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2281
2282
/*
2283
    'DSP' API
2284
*/
2285
2286
FMOD_RESULT F_API FMOD_DSP_Release                   (FMOD_DSP *dsp);
2287
FMOD_RESULT F_API FMOD_DSP_GetSystemObject           (FMOD_DSP *dsp, FMOD_SYSTEM **system);
2288
2289
/*
2290
     Connection / disconnection / input and output enumeration.
2291
*/
2292
2293
FMOD_RESULT F_API FMOD_DSP_AddInput                  (FMOD_DSP *dsp, FMOD_DSP *target, FMOD_DSPCONNECTION **connection);
2294
FMOD_RESULT F_API FMOD_DSP_DisconnectFrom            (FMOD_DSP *dsp, FMOD_DSP *target);
2295
FMOD_RESULT F_API FMOD_DSP_DisconnectAll             (FMOD_DSP *dsp, FMOD_BOOL inputs, FMOD_BOOL outputs);
2296
FMOD_RESULT F_API FMOD_DSP_Remove                    (FMOD_DSP *dsp);
2297
FMOD_RESULT F_API FMOD_DSP_GetNumInputs              (FMOD_DSP *dsp, int *numinputs);
2298
FMOD_RESULT F_API FMOD_DSP_GetNumOutputs             (FMOD_DSP *dsp, int *numoutputs);
2299
FMOD_RESULT F_API FMOD_DSP_GetInput                  (FMOD_DSP *dsp, int index, FMOD_DSP **input, FMOD_DSPCONNECTION **inputconnection);
2300
FMOD_RESULT F_API FMOD_DSP_GetOutput                 (FMOD_DSP *dsp, int index, FMOD_DSP **output, FMOD_DSPCONNECTION **outputconnection);
2301
2302
/*
2303
     DSP unit control.
2304
*/
2305
2306
FMOD_RESULT F_API FMOD_DSP_SetActive                 (FMOD_DSP *dsp, FMOD_BOOL active);
2307
FMOD_RESULT F_API FMOD_DSP_GetActive                 (FMOD_DSP *dsp, FMOD_BOOL *active);
2308
FMOD_RESULT F_API FMOD_DSP_SetBypass                 (FMOD_DSP *dsp, FMOD_BOOL bypass);
2309
FMOD_RESULT F_API FMOD_DSP_GetBypass                 (FMOD_DSP *dsp, FMOD_BOOL *bypass);
2310
FMOD_RESULT F_API FMOD_DSP_SetSpeakerActive          (FMOD_DSP *dsp, FMOD_SPEAKER speaker, FMOD_BOOL active);
2311
FMOD_RESULT F_API FMOD_DSP_GetSpeakerActive          (FMOD_DSP *dsp, FMOD_SPEAKER speaker, FMOD_BOOL *active);
2312
FMOD_RESULT F_API FMOD_DSP_Reset                     (FMOD_DSP *dsp);
2313
2314
/*
2315
     DSP parameter control.
2316
*/
2317
2318
FMOD_RESULT F_API FMOD_DSP_SetParameter              (FMOD_DSP *dsp, int index, float value);
2319
FMOD_RESULT F_API FMOD_DSP_GetParameter              (FMOD_DSP *dsp, int index, float *value, char *valuestr, int valuestrlen);
2320
FMOD_RESULT F_API FMOD_DSP_GetNumParameters          (FMOD_DSP *dsp, int *numparams);
2321
FMOD_RESULT F_API FMOD_DSP_GetParameterInfo          (FMOD_DSP *dsp, int index, char *name, char *label, char *description, int descriptionlen, float *min, float *max);
2322
FMOD_RESULT F_API FMOD_DSP_ShowConfigDialog          (FMOD_DSP *dsp, void *hwnd, FMOD_BOOL show);
2323
2324
/*
2325
     DSP attributes.        
2326
*/
2327
2328
FMOD_RESULT F_API FMOD_DSP_GetInfo                   (FMOD_DSP *dsp, char *name, unsigned int *version, int *channels, int *configwidth, int *configheight);
2329
FMOD_RESULT F_API FMOD_DSP_GetType                   (FMOD_DSP *dsp, FMOD_DSP_TYPE *type);
2330
FMOD_RESULT F_API FMOD_DSP_SetDefaults               (FMOD_DSP *dsp, float frequency, float volume, float pan, int priority);
2331
FMOD_RESULT F_API FMOD_DSP_GetDefaults               (FMOD_DSP *dsp, float *frequency, float *volume, float *pan, int *priority);
2332
2333
/*
2334
     Userdata set/get.
2335
*/
2336
2337
FMOD_RESULT F_API FMOD_DSP_SetUserData               (FMOD_DSP *dsp, void *userdata);
2338
FMOD_RESULT F_API FMOD_DSP_GetUserData               (FMOD_DSP *dsp, void **userdata);
2339
2340
FMOD_RESULT F_API FMOD_DSP_GetMemoryInfo             (FMOD_DSP *dsp, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2341
2342
/*
2343
    'DSPConnection' API
2344
*/
2345
2346
FMOD_RESULT F_API FMOD_DSPConnection_GetInput        (FMOD_DSPCONNECTION *dspconnection, FMOD_DSP **input);
2347
FMOD_RESULT F_API FMOD_DSPConnection_GetOutput       (FMOD_DSPCONNECTION *dspconnection, FMOD_DSP **output);
2348
FMOD_RESULT F_API FMOD_DSPConnection_SetMix          (FMOD_DSPCONNECTION *dspconnection, float volume);
2349
FMOD_RESULT F_API FMOD_DSPConnection_GetMix          (FMOD_DSPCONNECTION *dspconnection, float *volume);
2350
FMOD_RESULT F_API FMOD_DSPConnection_SetLevels       (FMOD_DSPCONNECTION *dspconnection, FMOD_SPEAKER speaker, float *levels, int numlevels);
2351
FMOD_RESULT F_API FMOD_DSPConnection_GetLevels       (FMOD_DSPCONNECTION *dspconnection, FMOD_SPEAKER speaker, float *levels, int numlevels);
2352
2353
/*
2354
     Userdata set/get.
2355
*/
2356
2357
FMOD_RESULT F_API FMOD_DSPConnection_SetUserData     (FMOD_DSPCONNECTION *dspconnection, void *userdata);
2358
FMOD_RESULT F_API FMOD_DSPConnection_GetUserData     (FMOD_DSPCONNECTION *dspconnection, void **userdata);
2359
2360
FMOD_RESULT F_API FMOD_DSPConnection_GetMemoryInfo   (FMOD_DSPCONNECTION *dspconnection, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2361
2362
/*
2363
    'Geometry' API
2364
*/
2365
2366
FMOD_RESULT F_API FMOD_Geometry_Release              (FMOD_GEOMETRY *geometry);
2367
2368
/*
2369
     Polygon manipulation.
2370
*/
2371
2372
FMOD_RESULT F_API FMOD_Geometry_AddPolygon           (FMOD_GEOMETRY *geometry, float directocclusion, float reverbocclusion, FMOD_BOOL doublesided, int numvertices, const FMOD_VECTOR *vertices, int *polygonindex);
2373
FMOD_RESULT F_API FMOD_Geometry_GetNumPolygons       (FMOD_GEOMETRY *geometry, int *numpolygons);
2374
FMOD_RESULT F_API FMOD_Geometry_GetMaxPolygons       (FMOD_GEOMETRY *geometry, int *maxpolygons, int *maxvertices);
2375
FMOD_RESULT F_API FMOD_Geometry_GetPolygonNumVertices(FMOD_GEOMETRY *geometry, int index, int *numvertices);
2376
FMOD_RESULT F_API FMOD_Geometry_SetPolygonVertex     (FMOD_GEOMETRY *geometry, int index, int vertexindex, const FMOD_VECTOR *vertex);
2377
FMOD_RESULT F_API FMOD_Geometry_GetPolygonVertex     (FMOD_GEOMETRY *geometry, int index, int vertexindex, FMOD_VECTOR *vertex);
2378
FMOD_RESULT F_API FMOD_Geometry_SetPolygonAttributes (FMOD_GEOMETRY *geometry, int index, float directocclusion, float reverbocclusion, FMOD_BOOL doublesided);
2379
FMOD_RESULT F_API FMOD_Geometry_GetPolygonAttributes (FMOD_GEOMETRY *geometry, int index, float *directocclusion, float *reverbocclusion, FMOD_BOOL *doublesided);
2380
2381
/*
2382
     Object manipulation.
2383
*/
2384
2385
FMOD_RESULT F_API FMOD_Geometry_SetActive            (FMOD_GEOMETRY *geometry, FMOD_BOOL active);
2386
FMOD_RESULT F_API FMOD_Geometry_GetActive            (FMOD_GEOMETRY *geometry, FMOD_BOOL *active);
2387
FMOD_RESULT F_API FMOD_Geometry_SetRotation          (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
2388
FMOD_RESULT F_API FMOD_Geometry_GetRotation          (FMOD_GEOMETRY *geometry, FMOD_VECTOR *forward, FMOD_VECTOR *up);
2389
FMOD_RESULT F_API FMOD_Geometry_SetPosition          (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *position);
2390
FMOD_RESULT F_API FMOD_Geometry_GetPosition          (FMOD_GEOMETRY *geometry, FMOD_VECTOR *position);
2391
FMOD_RESULT F_API FMOD_Geometry_SetScale             (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *scale);
2392
FMOD_RESULT F_API FMOD_Geometry_GetScale             (FMOD_GEOMETRY *geometry, FMOD_VECTOR *scale);
2393
FMOD_RESULT F_API FMOD_Geometry_Save                 (FMOD_GEOMETRY *geometry, void *data, int *datasize);
2394
2395
/*
2396
     Userdata set/get.
2397
*/
2398
2399
FMOD_RESULT F_API FMOD_Geometry_SetUserData          (FMOD_GEOMETRY *geometry, void *userdata);
2400
FMOD_RESULT F_API FMOD_Geometry_GetUserData          (FMOD_GEOMETRY *geometry, void **userdata);
2401
2402
FMOD_RESULT F_API FMOD_Geometry_GetMemoryInfo        (FMOD_GEOMETRY *geometry, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2403
2404
/*
2405
    'Reverb' API
2406
*/
2407
2408
FMOD_RESULT F_API FMOD_Reverb_Release                (FMOD_REVERB *reverb);
2409
2410
/*
2411
     Reverb manipulation.
2412
*/
2413
2414
FMOD_RESULT F_API FMOD_Reverb_Set3DAttributes        (FMOD_REVERB *reverb, const FMOD_VECTOR *position, float mindistance, float maxdistance);
2415
FMOD_RESULT F_API FMOD_Reverb_Get3DAttributes        (FMOD_REVERB *reverb, FMOD_VECTOR *position, float *mindistance, float *maxdistance);
2416
FMOD_RESULT F_API FMOD_Reverb_SetProperties          (FMOD_REVERB *reverb, const FMOD_REVERB_PROPERTIES *properties);
2417
FMOD_RESULT F_API FMOD_Reverb_GetProperties          (FMOD_REVERB *reverb, FMOD_REVERB_PROPERTIES *properties);
2418
FMOD_RESULT F_API FMOD_Reverb_SetActive              (FMOD_REVERB *reverb, FMOD_BOOL active);
2419
FMOD_RESULT F_API FMOD_Reverb_GetActive              (FMOD_REVERB *reverb, FMOD_BOOL *active);
2420
2421
/*
2422
     Userdata set/get.
2423
*/
2424
2425
FMOD_RESULT F_API FMOD_Reverb_SetUserData            (FMOD_REVERB *reverb, void *userdata);
2426
FMOD_RESULT F_API FMOD_Reverb_GetUserData            (FMOD_REVERB *reverb, void **userdata);
2427
2428
FMOD_RESULT F_API FMOD_Reverb_GetMemoryInfo          (FMOD_REVERB *reverb, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array);
2429
/*$ preserve start $*/
2430
2431
#ifdef __cplusplus
2432
}
2433
#endif
2434
2435
#endif
2436
2437
/*$ preserve end $*/