LZScene

Форк
0
/
fmodtypes.pas 
805 строк · 42.5 Кб
1
//
2
// This unit is part of the GLScene Engine https://github.com/glscene
3
//
4
{================================================================================================ }
5
{ FMOD Types header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.              }
6
{ =============================================================================================== }
7
{
8
  NOTE: For the demos to run you must have either fmod.dll (in Windows)
9
  or libfmod-3.75.so (in Linux) installed.
10

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)
15

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.
22
}
23
{ =============================================================================================== }
24

25
unit fmodtypes;
26

27

28
  {$IFDEF WIN32}
29
    {$DEFINE MSWINDOWS}
30
  {$ENDIF}
31
  {$PACKRECORDS C}
32

33

34
interface
35

36
{$IFDEF MSWINDOWS}
37
uses
38
  Windows;
39
{$ENDIF}
40

41
{ =============================================================================================== }
42
{ DEFINITIONS                                                                                     }
43
{ =============================================================================================== }
44

45
{
46
  Force four-byte enums
47
}
48
{$Z4}
49

50
{
51
  Disable warning for unsafe types in Delphi 7
52
}
53
{$IFDEF VER150}
54
{$WARN UNSAFE_TYPE OFF}
55
{$ENDIF}
56

57
const
58
  FMOD_VERSION: Single = 3.75;
59

60
{
61
  FMOD defined types
62
}
63

64
type
65
  PFSoundSample = Pointer;
66
  PFSoundStream = Pointer;
67
  PFSoundDSPUnit = Pointer;
68
  PFMusicModule = Pointer;
69
  PFSyncPoint = Pointer;
70

71
  PFSoundVector = ^TFSoundVector;
72
  TFSoundVector = record
73
    x: Single;
74
    y: Single;
75
    z: Single;
76
  end;
77

78
  {
79
    Callback types
80
  }
81

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};
85

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};
91

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};
95

96
  TFMetaDataCallback      = function(Name: PChar; Value: PChar; userdata: Integer): ByteBool;  {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
97

98
{
99
[ENUM]
100
[
101
  [DESCRIPTION]
102
  On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
103

104
  [SEE_ALSO]
105
  FSOUND_GetError
106
]
107
}
108

109
type
110
  TFModErrors = (
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
131
  );
132

133
{
134
[ENUM]
135
[
136
    [DESCRIPTION]
137
    These output types are used with FSOUND_SetOutput, to choose which output driver to use.
138

139
	FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
140
	does not support DirectX 6 Voice Manager Extensions.
141

142
    FSOUND_OUTPUT_WINMM is recommended for NT and CE.
143

144
    [SEE_ALSO]
145
    FSOUND_SetOutput
146
    FSOUND_GetOutput
147
]
148
}
149

150
type
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.
156

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.
160

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.
167

168
    FSOUND_OUTPUT_NOSOUND_NONREALTIME   // This is the same as nosound, but the sound generation is driven by FSOUND_Update
169
  );
170

171

172
{
173
[ENUM]
174
[
175
  [DESCRIPTION]
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.
179

180
  [SEE_ALSO]
181
  FSOUND_SetMixer
182
  FSOUND_GetMixer
183
]
184
}
185
type
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
191

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.
196

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
199

200
    FSOUND_MIXER_MAX
201
  );
202

203

204
{
205
[ENUM]
206
[
207
  [DESCRIPTION]
208
  These definitions describe the type of song being played.
209

210
  [SEE_ALSO]
211
  FMUSIC_GetType
212
]
213
}
214
type
215
  TFMusicTypes = (
216
    FMUSIC_TYPE_NONE,
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
223
  );
224

225

226
{
227
[DEFINE_START]
228
[
229
  [NAME]
230
  FSOUND_DSP_PRIORITIES
231

232
  [DESCRIPTION]
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.
237

238
  [SEE_ALSO]
239
  FSOUND_DSP_Create
240
  FSOUND_DSP_SetPriority
241
  FSOUND_DSP_GetSpectrum
242
]
243
}
244
const
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
251
// [DEFINE_END]
252

253

254
{
255
[DEFINE_START]
256
[
257
  [NAME]
258
  FSOUND_CAPS
259

260
  [DESCRIPTION]
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
263
  FSOUND_OUTPUTTYPES
264

265
  [SEE_ALSO]
266
  FSOUND_GetDriverCaps
267
  FSOUND_OUTPUTTYPES
268
]
269
}
270
const
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
274
// [DEFINE_END]
275

276

277
{
278
[DEFINE_START]
279
[
280
    [NAME]
281
    FSOUND_MODES
282

283
    [DESCRIPTION]
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.
290

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    
296

297
    See flag descriptions for what these do.
298
]
299
}
300
const
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
331

332
const
333
  FSOUND_NORMAL = (FSOUND_16BITS or FSOUND_SIGNED or FSOUND_MONO);
334
// [DEFINE_END]
335

336

337
{
338
[DEFINE_START]
339
[
340
    [NAME]
341
    FSOUND_CDPLAYMODES
342

343
    [DESCRIPTION]
344
    Playback method for a CD Audio track, using FSOUND_CD_SetPlayMode
345

346
    [SEE_ALSO]
347
    FSOUND_CD_SetPlayMode  
348
    FSOUND_CD_Play
349
]
350
}
351
const
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
356
// [DEFINE_END]
357

358

359
{
360
[DEFINE_START]
361
[
362
  [NAME]
363
  FSOUND_CHANNELSAMPLEMODE
364

365
  [DESCRIPTION]
366
  Miscellaneous values for FMOD functions.
367

368
  [SEE_ALSO]
369
  FSOUND_PlaySound
370
  FSOUND_PlaySoundEx
371
  FSOUND_Sample_Alloc
372
  FSOUND_Sample_Load
373
  FSOUND_SetPan
374
]
375
}
376
const
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
383
// [DEFINE_END]
384

385

386
{
387
[STRUCT_START]
388
[
389
    [NAME]
390
    FSOUND_REVERB_PROPERTIES
391

392
    [DESCRIPTION]
393
    Structure defining a reverb environment.
394

395
    [REMARKS]
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
400
    EAX2.
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.
408

409
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
410

411
    [SEE_ALSO]
412
    FSOUND_Reverb_SetProperties
413
    FSOUND_Reverb_GetProperties
414
    FSOUND_REVERB_PRESETS
415
    FSOUND_REVERB_FLAGS
416
]
417
}
418
type
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)
446
  end;
447
// [STRUCT_END]
448

449

450
{
451
[DEFINE_START]
452
[
453
    [NAME]
454
    FSOUND_REVERB_FLAGS
455

456
    [DESCRIPTION]
457
    Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
458

459
    [SEE_ALSO]
460
    FSOUND_REVERB_PROPERTIES
461
]
462
}
463
const
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;
478
// [DEFINE_END]
479

480

481
{
482
[DEFINE_START]
483
[
484
    [NAME]
485
    FSOUND_REVERB_PRESETS
486

487
    [DESCRIPTION]
488
    A set of predefined environment PARAMETERS, created by Creative Labs
489
    These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
490
    ie 
491
    FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
492

493
    [SEE_ALSO]
494
    FSOUND_Reverb_SetProperties
495
]
496
}
497
{
498
const
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 ;
524

525
// Non I3DL2 presets 
526

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 ;
530
}
531
// [DEFINE_END]
532

533

534
{
535
[STRUCTURE] 
536
[
537
    [DESCRIPTION]
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
543
    EAX2.
544

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.
552

553
    The numerical values listed below are the maximum, minimum and default values for each variable respectively.
554

555
    [SEE_ALSO]
556
    FSOUND_Reverb_SetChannelProperties
557
    FSOUND_Reverb_GetChannelProperties
558
    FSOUND_REVERB_CHANNELFLAGS
559
]
560
}
561
type
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)
581
  end;
582
// [STRUCT_END]
583

584
{
585
[DEFINE_START] 
586
[
587
    [NAME] 
588
    FSOUND_REVERB_CHANNELFLAGS
589
    
590
    [DESCRIPTION]
591
    Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
592

593
    [SEE_ALSO]
594
    FSOUND_REVERB_CHANNELPROPERTIES
595
]
596
}
597
const
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;
604
// [DEFINE_END]
605

606

607
{
608
[ENUM] 
609
[
610
	[DESCRIPTION]
611
    These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
612

613
	[SEE_ALSO]
614
    FSOUND_FX_Enable
615
    FSOUND_FX_Disable
616
    FSOUND_FX_SetChorus
617
    FSOUND_FX_SetCompressor
618
    FSOUND_FX_SetDistortion
619
    FSOUND_FX_SetEcho
620
    FSOUND_FX_SetFlanger
621
    FSOUND_FX_SetGargle
622
    FSOUND_FX_SetI3DL2Reverb
623
    FSOUND_FX_SetParamEQ
624
    FSOUND_FX_SetWavesReverb
625
]
626
}
627

628
type
629
  TFSoundFXModes = (
630
    FSOUND_FX_CHORUS,
631
    FSOUND_FX_COMPRESSOR,
632
    FSOUND_FX_DISTORTION,
633
    FSOUND_FX_ECHO,
634
    FSOUND_FX_FLANGER,
635
    FSOUND_FX_GARGLE,
636
    FSOUND_FX_I3DL2REVERB,
637
    FSOUND_FX_PARAMEQ,
638
    FSOUND_FX_WAVES_REVERB,
639
    FSOUND_FX_MAX
640
  );
641
// [DEFINE_END]
642

643

644
{
645
[ENUM]
646
[
647
	[DESCRIPTION]
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.
651

652
	[SEE_ALSO]
653
    FSOUND_SetSpeakerMode
654

655
    [REMARKS]
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.
658

659
    Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
660
]
661
}
662
type
663
  TFSoundSpeakerModes =
664
  (
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.
672
  );
673
  FSOUND_SPEAKERMODES = TFSoundSpeakerModes;
674

675

676
{
677
[DEFINE_START]
678
[
679
    [NAME] 
680
    FSOUND_INIT_FLAGS
681
    
682
    [DESCRIPTION]
683
    Initialization flags.  Use them with FSOUND_Init in the flags parameter to change various behaviour.
684

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.
689

690
    [SEE_ALSO]
691
    FSOUND_Init
692
]
693
}
694
const
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.
711

712
// [DEFINE_END]
713

714
(*
715
[ENUM]
716
[
717
    [DESCRIPTION]
718
    Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream.
719

720
    [SEE_ALSO]
721
    FSOUND_Stream_Net_GetStatus
722
]
723
*)
724
type
725
  TFSoundStreamNetStatus =
726
  (
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 *)
732
  );
733

734

735
(*
736
[ENUM]
737
[
738
    [DESCRIPTION]
739
    Describes the type of a particular tag field.
740

741
    [SEE_ALSO]
742
    FSOUND_Stream_GetNumTagFields
743
    FSOUND_Stream_GetTagField
744
    FSOUND_Stream_FindTagField
745
]
746
*)
747
type
748
  TFSoundTagFieldType =
749
  (
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 *)
756
  );
757

758

759
(*
760
[DEFINE_START]
761
[
762
    [NAME]
763
    FSOUND_STATUS_FLAGS
764

765
    [DESCRIPTION]
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.
767

768
    [SEE_ALSO]
769
    FSOUND_Stream_Net_GetStatus
770
]
771
*)
772
const
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;
778
(* [DEFINE_END] *)
779

780
{
781
[STRUCTURE] 
782
[
783
    [DESCRIPTION]
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.
787

788
    [SEE_ALSO]
789
    FSOUND_Stream_Open
790
    FSOUND_Stream_FindTagField
791
]
792
}
793
type
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.
800
  end;
801
// [STRUCT_END]
802

803
implementation
804

805
end.
806

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.