2
// This unit is part of the GLScene Engine https://github.com/glscene
4
{================================================================================================ }
5
{ FMOD Types header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004. }
6
{ =============================================================================================== }
8
NOTE: For the demos to run you must have either fmod.dll (in Windows)
9
or libfmod-3.75.so (in Linux) installed.
11
In Windows, copy the fmod.dll file found in the api directory to either of
12
the following locations (in order of preference)
13
- your application directory
14
- Windows\System (95/98) or WinNT\System32 (NT/2000/XP)
16
In Linux, make sure you are signed in as root and copy the libfmod-3.75.so
17
file from the api directory to your /usr/lib/ directory.
18
Then via a command line, navigate to the /usr/lib/ directory and create
19
a symbolic link between libfmod-3.75.so and libfmod.so. This is done with
20
the following command (assuming you are in /usr/lib/)...
21
ln -s libfmod-3.75.so libfmod.so.
23
{ =============================================================================================== }
41
{ =============================================================================================== }
43
{ =============================================================================================== }
51
Disable warning for unsafe types in Delphi 7
54
{$WARN UNSAFE_TYPE OFF}
58
FMOD_VERSION: Single = 3.75;
65
PFSoundSample = Pointer;
66
PFSoundStream = Pointer;
67
PFSoundDSPUnit = Pointer;
68
PFMusicModule = Pointer;
69
PFSyncPoint = Pointer;
71
PFSoundVector = ^TFSoundVector;
72
TFSoundVector = record
82
TFSoundStreamCallback = function (Stream: PFSoundStream; Buff: Pointer; Length, Param: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
83
TFSoundDSPCallback = function (OriginalBuffer: Pointer; NewBuffer: Pointer; Length, Param: Integer): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
84
TFMusicCallback = procedure (Module: PFMusicModule; Param: Byte); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
86
TFSoundOpenCallback = function (Name: PChar): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
87
TFSoundCloseCallback = procedure (Handle: Cardinal); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
88
TFSoundReadCallback = function (Buffer: Pointer; Size: Cardinal; Handle: Cardinal): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
89
TFSoundSeekCallback = procedure (Handle: Cardinal; Pos: Cardinal; Mode: Byte); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
90
TFSoundTellCallback = function (Handle: Cardinal): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
92
TFSoundAllocCallback = function(Size: Cardinal): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
93
TFSoundReallocCallback = function(Ptr: Pointer; Size: Cardinal): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
94
TFSoundFreeCallback = procedure(Ptr: Pointer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
96
TFMetaDataCallback = function(Name: PChar; Value: PChar; userdata: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
102
On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
111
FMOD_ERR_NONE, // No errors
112
FMOD_ERR_BUSY, // Cannot call this command after FSOUND_Init. Call FSOUND_Close first.
113
FMOD_ERR_UNINITIALIZED, // This command failed because FSOUND_Init was not called
114
FMOD_ERR_INIT, // Error initializing output device.
115
FMOD_ERR_ALLOCATED, // Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
116
FMOD_ERR_PLAY, // Playing the sound failed.
117
FMOD_ERR_OUTPUT_FORMAT, // Soundcard does not support the features needed for this soundsystem (16bit stereo output)
118
FMOD_ERR_COOPERATIVELEVEL, // Error setting cooperative level for hardware.
119
FMOD_ERR_CREATEBUFFER, // Error creating hardware sound buffer.
120
FMOD_ERR_FILE_NOTFOUND, // File not found
121
FMOD_ERR_FILE_FORMAT, // Unknown file format
122
FMOD_ERR_FILE_BAD, // Error loading file
123
FMOD_ERR_MEMORY, // Not enough memory or resources
124
FMOD_ERR_VERSION, // The version number of this file format is not supported
125
FMOD_ERR_INVALID_PARAM, // An invalid parameter was passed to this function
126
FMOD_ERR_NO_EAX, // Tried to use an EAX command on a non EAX enabled channel or output.
127
FMOD_ERR_CHANNEL_ALLOC, // Failed to allocate a new channel
128
FMOD_ERR_RECORD, // Recording is not supported on this machine
129
FMOD_ERR_MEDIAPLAYER, // Windows Media Player not installed so cannot play wma or use internet streaming. */
130
FMOD_ERR_CDDEVICE // An error occured trying to open the specified CD device
137
These output types are used with FSOUND_SetOutput, to choose which output driver to use.
139
FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
140
does not support DirectX 6 Voice Manager Extensions.
142
FSOUND_OUTPUT_WINMM is recommended for NT and CE.
151
TFSoundOutputTypes = (
152
FSOUND_OUTPUT_NOSOUND, // NoSound driver, all calls to this succeed but do nothing.
153
FSOUND_OUTPUT_WINMM, // Windows Multimedia driver.
154
FSOUND_OUTPUT_DSOUND, // DirectSound driver. You need this to get EAX2 or EAX3 support, or FX api support.
155
FSOUND_OUTPUT_A3D, // A3D driver.
157
FSOUND_OUTPUT_OSS, // Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers.
158
FSOUND_OUTPUT_ESD, // Linux/Unix ESD (Enlightment Sound Daemon) driver.
159
FSOUND_OUTPUT_ALSA, // Linux Alsa driver.
161
FSOUND_OUTPUT_ASIO, // Low latency ASIO driver.
162
FSOUND_OUTPUT_XBOX, // Xbox driver.
163
FSOUND_OUTPUT_PS2, // PlayStation 2 driver.
164
FSOUND_OUTPUT_MAC, // Mac SoundMager driver.
165
FSOUND_OUTPUT_GC, // Gamecube driver.
166
FSOUND_OUTPUT_PSP, // PlayStation Portable driver.
168
FSOUND_OUTPUT_NOSOUND_NONREALTIME // This is the same as nosound, but the sound generation is driven by FSOUND_Update
176
These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
177
upon for other reasons using FSOUND_GetMixer.
178
It is not necessary to set the mixer. FMOD will autodetect the best mixer for you.
186
TFSoundMixerTypes = (
187
FSOUND_MIXER_AUTODETECT, // CE/PS2/GC Only - Non interpolating/low quality mixer.
188
FSOUND_MIXER_BLENDMODE, // Removed / obsolete
189
FSOUND_MIXER_MMXP5, // Removed / obsolete
190
FSOUND_MIXER_MMXP6, // Removed / obsolete
192
FSOUND_MIXER_QUALITY_AUTODETECT,// All platforms - Autodetect the fastest quality mixer based on your cpu.
193
FSOUND_MIXER_QUALITY_FPU, // Win32/Linux only - Interpolating/volume ramping FPU mixer.
194
FSOUND_MIXER_QUALITY_MMXP5, // Win32/Linux only - Interpolating/volume ramping P5 MMX mixer.
195
FSOUND_MIXER_QUALITY_MMXP6, // Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer.
197
FSOUND_MIXER_MONO, // CE/PS2/GC only - MONO non interpolating/low quality mixer. For speed
198
FSOUND_MIXER_QUALITY_MONO, // CE/PS2/GC only - MONO Interpolating mixer. For speed
208
These definitions describe the type of song being played.
217
FMUSIC_TYPE_MOD, // Protracker / FastTracker
218
FMUSIC_TYPE_S3M, // ScreamTracker 3
219
FMUSIC_TYPE_XM, // FastTracker 2
220
FMUSIC_TYPE_IT, // Impulse Tracker
221
FMUSIC_TYPE_MIDI, // MIDI file
222
FMUSIC_TYPE_FSB // FMOD Sample Bank file
230
FSOUND_DSP_PRIORITIES
233
These default priorities are used by FMOD internal system DSP units. They describe the
234
position of the DSP chain, and the order of how audio processing is executed.
235
You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
236
unit), disable or even change the priority of a DSP unit.
240
FSOUND_DSP_SetPriority
241
FSOUND_DSP_GetSpectrum
245
FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT = 0; // DSP CLEAR unit - done first
246
FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT = 100; // DSP SFX unit - done second
247
FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT = 200; // DSP MUSIC unit - done third
248
FSOUND_DSP_DEFAULTPRIORITY_USER = 300; // User priority, use this as reference for your own DSP units
249
FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT = 900; // This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units
250
FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT = 1000; // DSP CLIP AND COPY unit - last
261
Driver description bitfields. Use FSOUND_Driver_GetCaps to determine if a driver enumerated
262
has the settings you are after. The enumerated driver depends on the output mode, see
271
FSOUND_CAPS_HARDWARE = $1; // This driver supports hardware accelerated 3d sound.
272
FSOUND_CAPS_EAX2 = $2; // This driver supports EAX 2 reverb
273
FSOUND_CAPS_EAX3 = $10; // This driver supports EAX 3 reverb
284
Sample description bitfields, OR them together for loading and describing samples.
285
NOTE. If the file format being loaded already has a defined format, such as WAV or MP3, then
286
trying to override the pre-defined format with a new set of format flags will not work. For
287
example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS. It will just
288
ignore the flag and go ahead loading it as 8bits. For these type of formats the only flags
289
you can specify that will really alter the behaviour of how it is loaded, are the following.
291
Looping behaviour - FSOUND_LOOP_OFF, FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI
292
Load destination - FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D
293
Loading behaviour - FSOUND_NONBLOCKING, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_MPEGHALFRATE, FSOUND_FORCEMONO
294
Playback behaviour - FSOUND_STREAMABLE, FSOUND_ENABLEFX
295
PlayStation 2 only - FSOUND_USECORE0, FSOUND_USECORE1, FSOUND_LOADMEMORYIOP
297
See flag descriptions for what these do.
301
FSOUND_LOOP_OFF = $00000001; // For non looping samples.
302
FSOUND_LOOP_NORMAL = $00000002; // For forward looping samples.
303
FSOUND_LOOP_BIDI = $00000004; // For bidirectional looping samples. (no effect if in hardware).
304
FSOUND_8BITS = $00000008; // For 8 bit samples.
305
FSOUND_16BITS = $00000010; // For 16 bit samples.
306
FSOUND_MONO = $00000020; // For mono samples.
307
FSOUND_STEREO = $00000040; // For stereo samples.
308
FSOUND_UNSIGNED = $00000080; // For user created source data containing unsigned samples.
309
FSOUND_SIGNED = $00000100; // For user created source data containing signed data.
310
FSOUND_DELTA = $00000200; // For user created source data stored as delta values.
311
FSOUND_IT214 = $00000400; // For user created source data stored using IT214 compression.
312
FSOUND_IT215 = $00000800; // For user created source data stored using IT215 compression.
313
FSOUND_HW3D = $00001000; // Attempts to make samples use 3d hardware acceleration. (if the card supports it)
314
FSOUND_2D = $00002000; // Ignores any 3d processing. Overrides FSOUND_HW3D. Located in software.
315
FSOUND_STREAMABLE = $00004000; // For a streamimg sound where you feed the data to it. */
316
FSOUND_LOADMEMORY = $00008000; // "name" will be interpreted as a pointer to data for streaming and samples.
317
FSOUND_LOADRAW = $00010000; // Will ignore file format and treat as raw pcm.
318
FSOUND_MPEGACCURATE = $00020000; // For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. WARNING, see FSOUND_Stream_OpenFile for inital opening time performance issues.
319
FSOUND_FORCEMONO = $00040000; // For forcing stereo streams and samples to be mono - needed if using FSOUND_HW3D and stereo data - incurs a small speed hit for streams
320
FSOUND_HW2D = $00080000; // 2D hardware sounds. allows hardware specific effects
321
FSOUND_ENABLEFX = $00100000; // Allows DX8 FX to be played back on a sound. Requires DirectX 8 - Note these sounds cannot be played more than once, be 8 bit, be less than a certain size, or have a changing frequency
322
FSOUND_MPEGHALFRATE = $00200000; // For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution
323
FSOUND_XADPCM = $00400000; // For XBOX only - Contents are compressed as XADPCM */
324
FSOUND_VAG = $00800000; // For PS2 only - Contents are compressed as Sony VAG format */
325
FSOUND_NONBLOCKING = $01000000; // For FSOUND_Stream_OpenFile - Causes stream to open in the background and not block the foreground app - stream plays only when ready.
326
FSOUND_GCADPCM = $02000000; // For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format
327
FSOUND_MULTICHANNEL = $04000000; // For PS2 only - Contents are interleaved into a multi-channel (more than stereo) format
328
FSOUND_USECORE0 = $08000000; // For PS2 only - Sample/Stream is forced to use hardware voices 00-23
329
FSOUND_USECORE1 = $10000000; // For PS2 only - Sample/Stream is forced to use hardware voices 24-47
330
FSOUND_LOADMEMORYIOP = $20000000; // For PS2 only - "name" will be interpreted as a pointer to data for streaming and samples. The address provided will be an IOP address
333
FSOUND_NORMAL = (FSOUND_16BITS or FSOUND_SIGNED or FSOUND_MONO);
344
Playback method for a CD Audio track, using FSOUND_CD_SetPlayMode
347
FSOUND_CD_SetPlayMode
352
FSOUND_CD_PLAYCONTINUOUS = 0; // Starts from the current track and plays to end of CD.
353
FSOUND_CD_PLAYONCE = 1; // Plays the specified track then stops.
354
FSOUND_CD_PLAYLOOPED = 2; // Plays the specified track looped, forever until stopped manually.
355
FSOUND_CD_PLAYRANDOM = 3; // Plays tracks in random order
363
FSOUND_CHANNELSAMPLEMODE
366
Miscellaneous values for FMOD functions.
377
FSOUND_FREE = -1; // value to play on any free channel, or to allocate a sample in a free sample slot.
378
FSOUND_UNMANAGED = -2; // value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot.
379
FSOUND_ALL = -3; // for a channel index , this flag will affect ALL channels available! Not supported by every function.
380
FSOUND_STEREOPAN = -1; // value for FSOUND_SetPan so that stereo sounds are not played at half volume. See FSOUND_SetPan for more on this.
381
FSOUND_SYSTEMCHANNEL = -1000; // special 'channel' ID for all channel based functions that want to alter the global FSOUND software mixing output
382
FSOUND_SYSTEMSAMPLE = -1000; // special 'sample' ID for all sample based functions that want to alter the global FSOUND software mixing output sample
390
FSOUND_REVERB_PROPERTIES
393
Structure defining a reverb environment.
396
For more indepth descriptions of the reverb properties under win32, please see the EAX2/EAX3
397
documentation at http://developer.creative.com/ under the 'downloads' section.
398
If they do not have the EAX3 documentation, then most information can be attained from
399
the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
401
Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
402
Note that integer values that typically range from -10,000 to 1000 are represented in
403
decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
404
PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).
405
Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
406
the reverb should product a similar effect on either platform.
407
Only WIN32 supports the reverb api.
409
The numerical values listed below are the maximum, minimum and default values for each variable respectively.
412
FSOUND_Reverb_SetProperties
413
FSOUND_Reverb_GetProperties
414
FSOUND_REVERB_PRESETS
419
TFSoundReverbProperties = record // MIN MAX DEFAULT DESCRIPTION
420
Environment: Cardinal; // 0 25 0 sets all listener properties (win32 only)
421
EnvSize: Single; // 1.0 100.0 7.5 environment size in meters (win32 only)
422
EnvDiffusion: Single; // 0.0 1.0 1.0 environment diffusion (win32/xbox)
423
Room: Integer; // -10000 0 -1000 room effect level (at mid frequencies) (win32/xbox)
424
RoomHF: Integer; // -10000 0 -100 relative room effect level at high frequencies (win32/xbox)
425
RoomLF: Integer; // -10000 0 0 relative room effect level at low frequencies (win32 only)
426
DecayTime: Single; // 0.1 20.0 1.49 reverberation decay time at mid frequencies (win32/xbox)
427
DecayHFRatio: Single; // 0.1 2.0 0.83 high-frequency to mid-frequency decay time ratio (win32/xbox)
428
DecayLFRatio: Single; // 0.1 2.0 1.0 low-frequency to mid-frequency decay time ratio (win32 only)
429
Reflections: Integer; // -10000 1000 -2602 early reflections level relative to room effect (win32/xbox)
430
ReflectionsDelay: Single; // 0.0 0.3 0.007 initial reflection delay time (win32/xbox)
431
ReflectionsPan: array [0..2] of Single; // 0,0,0 early reflections panning vector (win32 only)
432
Reverb: Integer; // -10000 2000 200 late reverberation level relative to room effect (win32/xbox)
433
ReverbDelay: Single; // 0.0 0.1 0.011 late reverberation delay time relative to initial reflection (win32/xbox)
434
ReverbPan: array [0..2] of Single; // 0,0,0 late reverberation panning vector (win32 only)
435
EchoTime: Single; // .075 0.25 0.25 echo time (win32 only)
436
EchoDepth: Single; // 0.0 1.0 0.0 echo depth (win32 only)
437
ModulationTime: Single; // 0.04 4.0 0.25 modulation time (win32 only)
438
ModulationDepth: Single; // 0.0 1.0 0.0 modulation depth (win32 only)
439
AirAbsorptionHF: Single; // -100 0.0 -5.0 change in level per meter at high frequencies (win32 only)
440
HFReference: Single; // 1000.0 20000 5000.0 reference high frequency (hz) (win32/xbox)
441
LFReference: Single; // 20.0 1000.0 250.0 reference low frequency (hz) (win32 only)
442
RoomRolloffFactor: Single; // 0.0 10.0 0.0 like FSOUND_3D_SetRolloffFactor but for room effect (win32/xbox)
443
Diffusion: Single; // 0.0 100.0 100.0 Value that controls the echo density in the late reverberation decay. (xbox only)
444
Density: Single; // 0.0 100.0 100.0 Value that controls the modal density in the late reverberation decay (xbox only)
445
Flags: Cardinal; // FSOUND_REVERB_PROPERTYFLAGS - modifies the behavior of above properties (win32 only)
457
Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
460
FSOUND_REVERB_PROPERTIES
464
FSOUND_REVERBFLAGS_DECAYTIMESCALE = $00000001; // EnvironmentSize affects reverberation decay time
465
FSOUND_REVERBFLAGS_REFLECTIONSSCALE = $00000002; // EnvironmentSize affects reflection level
466
FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE = $00000004; // EnvironmentSize affects initial reflection delay time
467
FSOUND_REVERBFLAGS_REVERBSCALE = $00000008; // EnvironmentSize affects reflections level
468
FSOUND_REVERBFLAGS_REVERBDELAYSCALE = $00000010; // EnvironmentSize affects late reverberation delay time
469
FSOUND_REVERBFLAGS_DECAYHFLIMIT = $00000020; // AirAbsorptionHF affects DecayHFRatio
470
FSOUND_REVERBFLAGS_ECHOTIMESCALE = $00000040; // EnvironmentSize affects echo time
471
FSOUND_REVERBFLAGS_MODULATIONTIMESCALE = $00000080; // EnvironmentSize affects modulation time
472
FSOUND_REVERB_FLAGS_CORE0 = $00000100; // PS2 Only - Reverb is applied to CORE0 (hw voices 0-23)
473
FSOUND_REVERB_FLAGS_CORE1 = $00000200; // PS2 Only - Reverb is applied to CORE1 (hw voices 24-47)
474
FSOUND_REVERBFLAGS_DEFAULT = FSOUND_REVERBFLAGS_DECAYTIMESCALE or FSOUND_REVERBFLAGS_REFLECTIONSSCALE or
475
FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE or FSOUND_REVERBFLAGS_REVERBSCALE or
476
FSOUND_REVERBFLAGS_REVERBDELAYSCALE or FSOUND_REVERBFLAGS_DECAYHFLIMIT or
477
FSOUND_REVERB_FLAGS_CORE0 or FSOUND_REVERB_FLAGS_CORE1;
485
FSOUND_REVERB_PRESETS
488
A set of predefined environment PARAMETERS, created by Creative Labs
489
These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
491
FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
494
FSOUND_Reverb_SetProperties
499
// 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
500
FSOUND_PRESET_OFF = 0, 7.5f, 1.00f, -10000, -10000, 0, 1.00f, 1.00f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 0.0f, 0.0f, 0x3f ;
501
FSOUND_PRESET_GENERIC = 0, 7.5f, 1.00f, -1000, -100, 0, 1.49f, 0.83f, 1.0f, -2602, 0.007f, 0.0f,0.0f,0.0f, 200, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
502
FSOUND_PRESET_PADDEDCELL = 1, 1.4f, 1.00f, -1000, -6000, 0, 0.17f, 0.10f, 1.0f, -1204, 0.001f, 0.0f,0.0f,0.0f, 207, 0.002f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
503
FSOUND_PRESET_ROOM = 2, 1.9f, 1.00f, -1000, -454, 0, 0.40f, 0.83f, 1.0f, -1646, 0.002f, 0.0f,0.0f,0.0f, 53, 0.003f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
504
FSOUND_PRESET_BATHROOM = 3, 1.4f, 1.00f, -1000, -1200, 0, 1.49f, 0.54f, 1.0f, -370, 0.007f, 0.0f,0.0f,0.0f, 1030, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 60.0f, 0x3f ;
505
FSOUND_PRESET_LIVINGROOM = 4, 2.5f, 1.00f, -1000, -6000, 0, 0.50f, 0.10f, 1.0f, -1376, 0.003f, 0.0f,0.0f,0.0f, -1104, 0.004f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
506
FSOUND_PRESET_STONEROOM = 5, 11.6f, 1.00f, -1000, -300, 0, 2.31f, 0.64f, 1.0f, -711, 0.012f, 0.0f,0.0f,0.0f, 83, 0.017f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
507
FSOUND_PRESET_AUDITORIUM = 6, 21.6f, 1.00f, -1000, -476, 0, 4.32f, 0.59f, 1.0f, -789, 0.020f, 0.0f,0.0f,0.0f, -289, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
508
FSOUND_PRESET_CONCERTHALL = 7, 19.6f, 1.00f, -1000, -500, 0, 3.92f, 0.70f, 1.0f, -1230, 0.020f, 0.0f,0.0f,0.0f, -2, 0.029f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
509
FSOUND_PRESET_CAVE = 8, 14.6f, 1.00f, -1000, 0, 0, 2.91f, 1.30f, 1.0f, -602, 0.015f, 0.0f,0.0f,0.0f, -302, 0.022f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f ;
510
FSOUND_PRESET_ARENA = 9, 36.2f, 1.00f, -1000, -698, 0, 7.24f, 0.33f, 1.0f, -1166, 0.020f, 0.0f,0.0f,0.0f, 16, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
511
FSOUND_PRESET_HANGAR = 10, 50.3f, 1.00f, -1000, -1000, 0, 10.05f, 0.23f, 1.0f, -602, 0.020f, 0.0f,0.0f,0.0f, 198, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
512
FSOUND_PRESET_CARPETTEDHALLWAY = 11, 1.9f, 1.00f, -1000, -4000, 0, 0.30f, 0.10f, 1.0f, -1831, 0.002f, 0.0f,0.0f,0.0f, -1630, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
513
FSOUND_PRESET_HALLWAY = 12, 1.8f, 1.00f, -1000, -300, 0, 1.49f, 0.59f, 1.0f, -1219, 0.007f, 0.0f,0.0f,0.0f, 441, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
514
FSOUND_PRESET_STONECORRIDOR = 13, 13.5f, 1.00f, -1000, -237, 0, 2.70f, 0.79f, 1.0f, -1214, 0.013f, 0.0f,0.0f,0.0f, 395, 0.020f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
515
FSOUND_PRESET_ALLEY = 14, 7.5f, 0.30f, -1000, -270, 0, 1.49f, 0.86f, 1.0f, -1204, 0.007f, 0.0f,0.0f,0.0f, -4, 0.011f, 0.0f,0.0f,0.0f, 0.125f, 0.95f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
516
FSOUND_PRESET_FOREST = 15, 38.0f, 0.30f, -1000, -3300, 0, 1.49f, 0.54f, 1.0f, -2560, 0.162f, 0.0f,0.0f,0.0f, -229, 0.088f, 0.0f,0.0f,0.0f, 0.125f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 79.0f, 100.0f, 0x3f ;
517
FSOUND_PRESET_CITY = 16, 7.5f, 0.50f, -1000, -800, 0, 1.49f, 0.67f, 1.0f, -2273, 0.007f, 0.0f,0.0f,0.0f, -1691, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 50.0f, 100.0f, 0x3f ;
518
FSOUND_PRESET_MOUNTAINS = 17, 100.0f, 0.27f, -1000, -2500, 0, 1.49f, 0.21f, 1.0f, -2780, 0.300f, 0.0f,0.0f,0.0f, -1434, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 27.0f, 100.0f, 0x1f ;
519
FSOUND_PRESET_QUARRY = 18, 17.5f, 1.00f, -1000, -1000, 0, 1.49f, 0.83f, 1.0f, -10000, 0.061f, 0.0f,0.0f,0.0f, 500, 0.025f, 0.0f,0.0f,0.0f, 0.125f, 0.70f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
520
FSOUND_PRESET_PLAIN = 19, 42.5f, 0.21f, -1000, -2000, 0, 1.49f, 0.50f, 1.0f, -2466, 0.179f, 0.0f,0.0f,0.0f, -1926, 0.100f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 21.0f, 100.0f, 0x3f ;
521
FSOUND_PRESET_PARKINGLOT = 20, 8.3f, 1.00f, -1000, 0, 0, 1.65f, 1.50f, 1.0f, -1363, 0.008f, 0.0f,0.0f,0.0f, -1153, 0.012f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f ;
522
FSOUND_PRESET_SEWERPIPE = 21, 1.7f, 0.80f, -1000, -1000, 0, 2.81f, 0.14f, 1.0f, 429, 0.014f, 0.0f,0.0f,0.0f, 1023, 0.021f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 80.0f, 60.0f, 0x3f ;
523
FSOUND_PRESET_UNDERWATER = 22, 1.8f, 1.00f, -1000, -4000, 0, 1.49f, 0.10f, 1.0f, -449, 0.007f, 0.0f,0.0f,0.0f, 1700, 0.011f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 1.18f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f ;
527
FSOUND_PRESET_DRUGGED = 23, 1.9f, 0.50f, -1000, 0, 0, 8.39f, 1.39f, 1.0f, -115, 0.002f, 0.0f,0.0f,0.0f, 985, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 0.25f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f ;
528
FSOUND_PRESET_DIZZY = 24, 1.8f, 0.60f, -1000, -400, 0, 17.23f, 0.56f, 1.0f, -1713, 0.020f, 0.0f,0.0f,0.0f, -613, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 1.00f, 0.81f, 0.310f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f ;
529
FSOUND_PRESET_PSYCHOTIC = 25, 1.0f, 0.50f, -1000, -151, 0, 7.56f, 0.91f, 1.0f, -626, 0.020f, 0.0f,0.0f,0.0f, 774, 0.030f, 0.0f,0.0f,0.0f, 0.250f, 0.00f, 4.00f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f ;
538
Structure defining the properties for a reverb source, related to a FSOUND channel.
539
For more indepth descriptions of the reverb properties under win32, please see the EAX3
540
documentation at http://developer.creative.com/ under the 'downloads' section.
541
If they do not have the EAX3 documentation, then most information can be attained from
542
the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
545
Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
546
Note that integer values that typically range from -10,000 to 1000 are represented in
547
decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
548
PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).
549
Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
550
the reverb should product a similar effect on either platform.
551
Linux and FMODCE do not support the reverb api.
553
The numerical values listed below are the maximum, minimum and default values for each variable respectively.
556
FSOUND_Reverb_SetChannelProperties
557
FSOUND_Reverb_GetChannelProperties
558
FSOUND_REVERB_CHANNELFLAGS
562
TFSoundReverbChannelProperties = record // MIN MAX DEFAULT
563
Direct: Integer; // -10000 1000 0 direct path level (at low and mid frequencies) (win32/xbox)
564
DirectHF: Integer; // -10000 0 0 relative direct path level at high frequencies (win32/xbox)
565
Room: Integer; // -10000 1000 0 room effect level (at low and mid frequencies) (win32/xbox)
566
RoomHF: Integer; // -10000 0 0 relative room effect level at high frequencies (win32/xbox)
567
Obstruction: Integer; // -10000 0 0 main obstruction control (attenuation at high frequencies) (win32/xbox)
568
ObstructionLFRatio: Single; // 0.0 1.0 0.0 obstruction low-frequency level re. main control (win32/xbox)
569
Occlusion: Integer; // -10000 0 0 main occlusion control (attenuation at high frequencies) (win32/xbox)
570
OcclusionLFRatio: Single; // 0.0 1.0 0.25 occlusion low-frequency level re. main control (win32/xbox)
571
OcclusionRoomRatio: Single; // 0.0 10.0 1.5 relative occlusion control for room effect (win32)
572
OcclusionDirectRatio: Single; // 0.0 10.0 1.0 relative occlusion control for direct path (win32)
573
Exclusion: Integer; // -10000 0 0 main exlusion control (attenuation at high frequencies) (win32)
574
ExclusionLFRatio: Single; // 0.0 1.0 1.0 exclusion low-frequency level re. main control (win32)
575
OutsideVolumeHF: Integer; // -10000 0 0 outside sound cone level at high frequencies (win32)
576
DopplerFactor: Single; // 0.0 10.0 0.0 like DS3D flDopplerFactor but per source (win32)
577
RolloffFactor: Single; // 0.0 10.0 0.0 like DS3D flRolloffFactor but per source (win32)
578
RoomRolloffFactor: Single; // 0.0 10.0 0.0 like DS3D flRolloffFactor but for room effect (win32/xbox)
579
AirAbsorptionFactor: Single; // 0.0 10.0 1.0 multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (win32)
580
Flags: Integer; // FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32)
588
FSOUND_REVERB_CHANNELFLAGS
591
Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
594
FSOUND_REVERB_CHANNELPROPERTIES
598
FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO = $01; // Automatic setting of 'Direct' due to distance from listener
599
FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO = $02; // Automatic setting of 'Room' due to distance from listener
600
FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO = $04; // Automatic setting of 'RoomHF' due to distance from listener
601
FSOUND_REVERB_CHANNELFLAGS_DEFAULT = FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO or
602
FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO or
603
FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO;
611
These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
617
FSOUND_FX_SetCompressor
618
FSOUND_FX_SetDistortion
622
FSOUND_FX_SetI3DL2Reverb
624
FSOUND_FX_SetWavesReverb
631
FSOUND_FX_COMPRESSOR,
632
FSOUND_FX_DISTORTION,
636
FSOUND_FX_I3DL2REVERB,
638
FSOUND_FX_WAVES_REVERB,
648
These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
649
Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only
650
interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
653
FSOUND_SetSpeakerMode
656
Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only
657
interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
659
Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
663
TFSoundSpeakerModes =
665
FSOUND_SPEAKERMODE_DOLBYDIGITAL, // The audio is played through a speaker arrangement of surround speakers with a subwoofer.
666
FSOUND_SPEAKERMODE_HEADPHONES, // The speakers are headphones.
667
FSOUND_SPEAKERMODE_MONO, // The speakers are monaural.
668
FSOUND_SPEAKERMODE_QUAD, // The speakers are quadraphonic.
669
FSOUND_SPEAKERMODE_STEREO, // The speakers are stereo (default value).
670
FSOUND_SPEAKERMODE_SURROUND, // The speakers are surround sound.
671
FSOUND_SPEAKERMODE_DTS // The audio is played through a speaker arrangement of surround speakers with a subwoofer.
673
FSOUND_SPEAKERMODES = TFSoundSpeakerModes;
683
Initialization flags. Use them with FSOUND_Init in the flags parameter to change various behaviour.
685
FSOUND_INIT_ENABLESYSTEMCHANNELFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
686
Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
687
This can be fixed with FSOUND_SetBufferSize. Increase the BufferSize until it works.
688
When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
695
FSOUND_INIT_USEDEFAULTMIDISYNTH = $01; // Causes MIDI playback to force software decoding.
696
FSOUND_INIT_GLOBALFOCUS = $02; // For DirectSound output - sound is not muted when window is out of focus.
697
FSOUND_INIT_ENABLESYSTEMCHANNELFX = $04; // For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output!
698
FSOUND_INIT_ACCURATEVULEVELS = $08; // This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit.
699
FSOUND_INIT_PS2_DISABLECORE0REVERB = $10; // PS2 only - Disable reverb on CORE 0 to regain SRAM.
700
FSOUND_INIT_PS2_DISABLECORE1REVERB = $20; // PS2 only - Disable reverb on CORE 1 to regain SRAM.
701
FSOUND_INIT_PS2_SWAPDMACORES = $40; // PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around.
702
FSOUND_INIT_DONTLATENCYADJUST = $80; // Callbacks are not latency adjusted, and are called at mix time. Also information functions are immediate.
703
FSOUND_INIT_GC_INITLIBS = $100; // Gamecube only - Initializes GC audio libraries.
704
FSOUND_INIT_STREAM_FROM_MAIN_THREAD = $200; // Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user.
705
FSOUND_INIT_PS2_USEVOLUMERAMPING = $400; // PS2 only - Turns on volume ramping system to remove hardware clicks.
706
FSOUND_INIT_DSOUND_DEFERRED = $800; // Win32 only - For DirectSound output. 3D commands are batched together and executed at FSOUND_Update.
707
FSOUND_INIT_DSOUND_HRTF_LIGHT = $1000; // Win32 only - For DirectSound output. FSOUND_HW3D buffers use a slightly higher quality algorithm when 3d hardware acceleration is not present.
708
FSOUND_INIT_DSOUND_HRTF_FULL = $2000; // Win32 only - For DirectSound output. FSOUND_HW3D buffers use full quality 3d playback when 3d hardware acceleration is not present.
709
FSOUND_INIT_XBOX_REMOVEHEADROOM = $4000; // 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.
710
FSOUND_INIT_PSP_SILENCEONUNDERRUN = $8000; // PSP only - If streams skip / stutter when device is powered on, either increase stream buffersize, or use this flag instead to play silence while the UMD is recovering.
718
Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream.
721
FSOUND_Stream_Net_GetStatus
725
TFSoundStreamNetStatus =
727
FSOUND_STREAM_NET_NOTCONNECTED, (* Stream hasn't connected yet *)
728
FSOUND_STREAM_NET_CONNECTING, (* Stream is connecting to remote host *)
729
FSOUND_STREAM_NET_BUFFERING, (* Stream is buffering data *)
730
FSOUND_STREAM_NET_READY, (* Stream is ready to play *)
731
FSOUND_STREAM_NET_ERROR (* Stream has suffered a fatal error *)
739
Describes the type of a particular tag field.
742
FSOUND_Stream_GetNumTagFields
743
FSOUND_Stream_GetTagField
744
FSOUND_Stream_FindTagField
748
TFSoundTagFieldType =
750
FSOUND_TAGFIELD_VORBISCOMMENT, (* A vorbis comment *)
751
FSOUND_TAGFIELD_ID3V1, (* Part of an ID3v1 tag *)
752
FSOUND_TAGFIELD_ID3V2, (* An ID3v2 frame *)
753
FSOUND_TAGFIELD_SHOUTCAST, (* A SHOUTcast header line *)
754
FSOUND_TAGFIELD_ICECAST, (* An Icecast header line *)
755
FSOUND_TAGFIELD_ASF (* An Advanced Streaming Format header line *)
766
These values describe the protocol and format of an internet stream. Use FSOUND_Stream_Net_GetStatus to retrieve this information for an open internet stream.
769
FSOUND_Stream_Net_GetStatus
773
FSOUND_PROTOCOL_SHOUTCAST = $00000001;
774
FSOUND_PROTOCOL_ICECAST = $00000002;
775
FSOUND_PROTOCOL_HTTP = $00000004;
776
FSOUND_FORMAT_MPEG = $00010000;
777
FSOUND_FORMAT_OGGVORBIS = $00020000;
784
Structure defining a CD table of contents. This structure is returned as a tag from FSOUND_Stream_FindTagField when the tag name "CD_TOC" is specified.
785
Note: All tracks on the CD - including data tracks- will be represented in this structure so it's use for anything other than generating disc id information is not recommended.
786
See the cdda example program for info on retrieving and using this structure.
790
FSOUND_Stream_FindTagField
794
TFSoundTOCTag = record
795
Name: array [0..3] of AnsiChar; // The string "TOC" (4th character is 0), just in case this structure is accidentally treated as a string.
796
NumTracks: Integer; // The number of tracks on the CD.
797
Min: array [0..99] of Integer; // The start offset of each track in minutes.
798
Sec: array [0..99] of Integer; // The start offset of each track in seconds.
799
Frame: array [0..99] of Integer; // The start offset of each track in frames.