FMOD.types.pas 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. //
  2. // The graphics engine GLScene
  3. //
  4. unit FMOD.types;
  5. (*===============================================================================================
  6. FMOD Types header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.
  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. In Windows, copy the fmod.dll file found in the api directory to either of
  11. the following locations (in order of preference)
  12. - your application directory
  13. - Windows\System (95/98) or WinNT\System32 (NT/2000/XP)
  14. In Linux, make sure you are signed in as root and copy the libfmod-3.75.so
  15. file from the api directory to your /usr/lib/ directory.
  16. Then via a command line, navigate to the /usr/lib/ directory and create
  17. a symbolic link between libfmod-3.75.so and libfmod.so. This is done with
  18. the following command (assuming you are in /usr/lib/)...
  19. ln -s libfmod-3.75.so libfmod.so.
  20. *)
  21. interface
  22. {$IFDEF MSWINDOWS}
  23. uses
  24. Winapi.Windows;
  25. {$ENDIF}
  26. (*===============================================================================================
  27. DEFINITIONS
  28. ===============================================================================================*)
  29. (*
  30. Force four-byte enums
  31. *)
  32. {$Z4}
  33. const
  34. FMOD_VERSION: Single = 3.75;
  35. (*
  36. FMOD defined types
  37. *)
  38. type
  39. PFSoundSample = Pointer;
  40. PFSoundStream = Pointer;
  41. PFSoundDSPUnit = Pointer;
  42. PFMusicModule = Pointer;
  43. PFSyncPoint = Pointer;
  44. PFSoundVector = ^TFSoundVector;
  45. TFSoundVector = record
  46. x: Single;
  47. y: Single;
  48. z: Single;
  49. end;
  50. (*
  51. Callback types
  52. *)
  53. TFSoundStreamCallback = function (Stream: PFSoundStream; Buff: Pointer; Length, Param: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  54. TFSoundDSPCallback = function (OriginalBuffer: Pointer; NewBuffer: Pointer; Length, Param: Integer): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  55. TFMusicCallback = procedure (Module: PFMusicModule; Param: Byte); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  56. TFSoundOpenCallback = function (Name: PChar): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  57. TFSoundCloseCallback = procedure (Handle: Cardinal); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  58. TFSoundReadCallback = function (Buffer: Pointer; Size: Cardinal; Handle: Cardinal): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  59. TFSoundSeekCallback = procedure (Handle: Cardinal; Pos: Cardinal; Mode: Byte); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  60. TFSoundTellCallback = function (Handle: Cardinal): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  61. TFSoundAllocCallback = function(Size: Cardinal): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  62. TFSoundReallocCallback = function(Ptr: Pointer; Size: Cardinal): Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  63. TFSoundFreeCallback = procedure(Ptr: Pointer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  64. TFMetaDataCallback = function(Name: PChar; Value: PChar; userdata: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  65. (*
  66. [ENUM]
  67. [
  68. [DESCRIPTION]
  69. On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
  70. [SEE_ALSO]
  71. FSOUND_GetError
  72. ]
  73. *)
  74. type
  75. TFModErrors = (
  76. FMOD_ERR_NONE, // No errors
  77. FMOD_ERR_BUSY, // Cannot call this command after FSOUND_Init. Call FSOUND_Close first.
  78. FMOD_ERR_UNINITIALIZED, // This command failed because FSOUND_Init was not called
  79. FMOD_ERR_INIT, // Error initializing output device.
  80. FMOD_ERR_ALLOCATED, // Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
  81. FMOD_ERR_PLAY, // Playing the sound failed.
  82. FMOD_ERR_OUTPUT_FORMAT, // Soundcard does not support the features needed for this soundsystem (16bit stereo output)
  83. FMOD_ERR_COOPERATIVELEVEL, // Error setting cooperative level for hardware.
  84. FMOD_ERR_CREATEBUFFER, // Error creating hardware sound buffer.
  85. FMOD_ERR_FILE_NOTFOUND, // File not found
  86. FMOD_ERR_FILE_FORMAT, // Unknown file format
  87. FMOD_ERR_FILE_BAD, // Error loading file
  88. FMOD_ERR_MEMORY, // Not enough memory or resources
  89. FMOD_ERR_VERSION, // The version number of this file format is not supported
  90. FMOD_ERR_INVALID_PARAM, // An invalid parameter was passed to this function
  91. FMOD_ERR_NO_EAX, // Tried to use an EAX command on a non EAX enabled channel or output.
  92. FMOD_ERR_CHANNEL_ALLOC, // Failed to allocate a new channel
  93. FMOD_ERR_RECORD, // Recording is not supported on this machine
  94. FMOD_ERR_MEDIAPLAYER, // Windows Media Player not installed so cannot play wma or use internet streaming. */
  95. FMOD_ERR_CDDEVICE // An error occured trying to open the specified CD device
  96. );
  97. (*
  98. [ENUM]
  99. [
  100. [DESCRIPTION]
  101. These output types are used with FSOUND_SetOutput, to choose which output driver to use.
  102. FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
  103. does not support DirectX 6 Voice Manager Extensions.
  104. FSOUND_OUTPUT_WINMM is recommended for NT and CE.
  105. [SEE_ALSO]
  106. FSOUND_SetOutput
  107. FSOUND_GetOutput
  108. ]
  109. *)
  110. type
  111. TFSoundOutputTypes = (
  112. FSOUND_OUTPUT_NOSOUND, // NoSound driver, all calls to this succeed but do nothing.
  113. FSOUND_OUTPUT_WINMM, // Windows Multimedia driver.
  114. FSOUND_OUTPUT_DSOUND, // DirectSound driver. You need this to get EAX2 or EAX3 support, or FX api support.
  115. FSOUND_OUTPUT_A3D, // A3D driver.
  116. FSOUND_OUTPUT_OSS, // Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers.
  117. FSOUND_OUTPUT_ESD, // Linux/Unix ESD (Enlightment Sound Daemon) driver.
  118. FSOUND_OUTPUT_ALSA, // Linux Alsa driver.
  119. FSOUND_OUTPUT_ASIO, // Low latency ASIO driver.
  120. FSOUND_OUTPUT_XBOX, // Xbox driver.
  121. FSOUND_OUTPUT_PS2, // PlayStation 2 driver.
  122. FSOUND_OUTPUT_MAC, // Mac SoundMager driver.
  123. FSOUND_OUTPUT_GC, // Gamecube driver.
  124. FSOUND_OUTPUT_PSP, // PlayStation Portable driver.
  125. FSOUND_OUTPUT_NOSOUND_NONREALTIME // This is the same as nosound, but the sound generation is driven by FSOUND_Update
  126. );
  127. (*
  128. [ENUM]
  129. [
  130. [DESCRIPTION]
  131. These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
  132. upon for other reasons using FSOUND_GetMixer.
  133. It is not necessary to set the mixer. FMOD will autodetect the best mixer for you.
  134. [SEE_ALSO]
  135. FSOUND_SetMixer
  136. FSOUND_GetMixer
  137. ]
  138. *)
  139. type
  140. TFSoundMixerTypes = (
  141. FSOUND_MIXER_AUTODETECT, // CE/PS2/GC Only - Non interpolating/low quality mixer.
  142. FSOUND_MIXER_BLENDMODE, // Removed / obsolete
  143. FSOUND_MIXER_MMXP5, // Removed / obsolete
  144. FSOUND_MIXER_MMXP6, // Removed / obsolete
  145. FSOUND_MIXER_QUALITY_AUTODETECT,// All platforms - Autodetect the fastest quality mixer based on your cpu.
  146. FSOUND_MIXER_QUALITY_FPU, // Win32/Linux only - Interpolating/volume ramping FPU mixer.
  147. FSOUND_MIXER_QUALITY_MMXP5, // Win32/Linux only - Interpolating/volume ramping P5 MMX mixer.
  148. FSOUND_MIXER_QUALITY_MMXP6, // Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer.
  149. FSOUND_MIXER_MONO, // CE/PS2/GC only - MONO non interpolating/low quality mixer. For speed
  150. FSOUND_MIXER_QUALITY_MONO, // CE/PS2/GC only - MONO Interpolating mixer. For speed
  151. FSOUND_MIXER_MAX
  152. );
  153. (*
  154. [ENUM]
  155. [
  156. [DESCRIPTION]
  157. These definitions describe the type of song being played.
  158. [SEE_ALSO]
  159. FMUSIC_GetType
  160. ]
  161. *)
  162. type
  163. TFMusicTypes = (
  164. FMUSIC_TYPE_NONE,
  165. FMUSIC_TYPE_MOD, // Protracker / FastTracker
  166. FMUSIC_TYPE_S3M, // ScreamTracker 3
  167. FMUSIC_TYPE_XM, // FastTracker 2
  168. FMUSIC_TYPE_IT, // Impulse Tracker
  169. FMUSIC_TYPE_MIDI, // MIDI file
  170. FMUSIC_TYPE_FSB // FMOD Sample Bank file
  171. );
  172. (*
  173. [DEFINE_START]
  174. [
  175. [NAME]
  176. FSOUND_DSP_PRIORITIES
  177. [DESCRIPTION]
  178. These default priorities are used by FMOD internal system DSP units. They describe the
  179. position of the DSP chain, and the order of how audio processing is executed.
  180. You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
  181. unit), disable or even change the priority of a DSP unit.
  182. [SEE_ALSO]
  183. FSOUND_DSP_Create
  184. FSOUND_DSP_SetPriority
  185. FSOUND_DSP_GetSpectrum
  186. ]
  187. *)
  188. const
  189. FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT = 0; // DSP CLEAR unit - done first
  190. FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT = 100; // DSP SFX unit - done second
  191. FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT = 200; // DSP MUSIC unit - done third
  192. FSOUND_DSP_DEFAULTPRIORITY_USER = 300; // User priority, use this as reference for your own DSP units
  193. FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT = 900; // This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units
  194. FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT = 1000; // DSP CLIP AND COPY unit - last
  195. // [DEFINE_END]
  196. (*
  197. [DEFINE_START]
  198. [
  199. [NAME]
  200. FSOUND_CAPS
  201. [DESCRIPTION]
  202. Driver description bitfields. Use FSOUND_Driver_GetCaps to determine if a driver enumerated
  203. has the settings you are after. The enumerated driver depends on the output mode, see
  204. FSOUND_OUTPUTTYPES
  205. [SEE_ALSO]
  206. FSOUND_GetDriverCaps
  207. FSOUND_OUTPUTTYPES
  208. ]
  209. *)
  210. const
  211. FSOUND_CAPS_HARDWARE = $1; // This driver supports hardware accelerated 3d sound.
  212. FSOUND_CAPS_EAX2 = $2; // This driver supports EAX 2 reverb
  213. FSOUND_CAPS_EAX3 = $10; // This driver supports EAX 3 reverb
  214. // [DEFINE_END]
  215. (*
  216. [DEFINE_START]
  217. [
  218. [NAME]
  219. FSOUND_MODES
  220. [DESCRIPTION]
  221. Sample description bitfields, OR them together for loading and describing samples.
  222. NOTE. If the file format being loaded already has a defined format, such as WAV or MP3, then
  223. trying to override the pre-defined format with a new set of format flags will not work. For
  224. example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS. It will just
  225. ignore the flag and go ahead loading it as 8bits. For these type of formats the only flags
  226. you can specify that will really alter the behaviour of how it is loaded, are the following.
  227. Looping behaviour - FSOUND_LOOP_OFF, FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI
  228. Load destination - FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D
  229. Loading behaviour - FSOUND_NONBLOCKING, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_MPEGHALFRATE, FSOUND_FORCEMONO
  230. Playback behaviour - FSOUND_STREAMABLE, FSOUND_ENABLEFX
  231. PlayStation 2 only - FSOUND_USECORE0, FSOUND_USECORE1, FSOUND_LOADMEMORYIOP
  232. See flag descriptions for what these do.
  233. ]
  234. *)
  235. const
  236. FSOUND_LOOP_OFF = $00000001; // For non looping samples.
  237. FSOUND_LOOP_NORMAL = $00000002; // For forward looping samples.
  238. FSOUND_LOOP_BIDI = $00000004; // For bidirectional looping samples. (no effect if in hardware).
  239. FSOUND_8BITS = $00000008; // For 8 bit samples.
  240. FSOUND_16BITS = $00000010; // For 16 bit samples.
  241. FSOUND_MONO = $00000020; // For mono samples.
  242. FSOUND_STEREO = $00000040; // For stereo samples.
  243. FSOUND_UNSIGNED = $00000080; // For user created source data containing unsigned samples.
  244. FSOUND_SIGNED = $00000100; // For user created source data containing signed data.
  245. FSOUND_DELTA = $00000200; // For user created source data stored as delta values.
  246. FSOUND_IT214 = $00000400; // For user created source data stored using IT214 compression.
  247. FSOUND_IT215 = $00000800; // For user created source data stored using IT215 compression.
  248. FSOUND_HW3D = $00001000; // Attempts to make samples use 3d hardware acceleration. (if the card supports it)
  249. FSOUND_2D = $00002000; // Ignores any 3d processing. Overrides FSOUND_HW3D. Located in software.
  250. FSOUND_STREAMABLE = $00004000; // For a streamimg sound where you feed the data to it. */
  251. FSOUND_LOADMEMORY = $00008000; // "name" will be interpreted as a pointer to data for streaming and samples.
  252. FSOUND_LOADRAW = $00010000; // Will ignore file format and treat as raw pcm.
  253. 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.
  254. 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
  255. FSOUND_HW2D = $00080000; // 2D hardware sounds. allows hardware specific effects
  256. 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
  257. FSOUND_MPEGHALFRATE = $00200000; // For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution
  258. FSOUND_XADPCM = $00400000; // For XBOX only - Contents are compressed as XADPCM */
  259. FSOUND_VAG = $00800000; // For PS2 only - Contents are compressed as Sony VAG format */
  260. 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.
  261. FSOUND_GCADPCM = $02000000; // For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format
  262. FSOUND_MULTICHANNEL = $04000000; // For PS2 only - Contents are interleaved into a multi-channel (more than stereo) format
  263. FSOUND_USECORE0 = $08000000; // For PS2 only - Sample/Stream is forced to use hardware voices 00-23
  264. FSOUND_USECORE1 = $10000000; // For PS2 only - Sample/Stream is forced to use hardware voices 24-47
  265. 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
  266. const
  267. FSOUND_NORMAL = (FSOUND_16BITS or FSOUND_SIGNED or FSOUND_MONO);
  268. // [DEFINE_END]
  269. (*
  270. [DEFINE_START]
  271. [
  272. [NAME]
  273. FSOUND_CDPLAYMODES
  274. [DESCRIPTION]
  275. Playback method for a CD Audio track, using FSOUND_CD_SetPlayMode
  276. [SEE_ALSO]
  277. FSOUND_CD_SetPlayMode
  278. FSOUND_CD_Play
  279. ]
  280. *)
  281. const
  282. FSOUND_CD_PLAYCONTINUOUS = 0; // Starts from the current track and plays to end of CD.
  283. FSOUND_CD_PLAYONCE = 1; // Plays the specified track then stops.
  284. FSOUND_CD_PLAYLOOPED = 2; // Plays the specified track looped, forever until stopped manually.
  285. FSOUND_CD_PLAYRANDOM = 3; // Plays tracks in random order
  286. // [DEFINE_END]
  287. (*
  288. [DEFINE_START]
  289. [
  290. [NAME]
  291. FSOUND_CHANNELSAMPLEMODE
  292. [DESCRIPTION]
  293. Miscellaneous values for FMOD functions.
  294. [SEE_ALSO]
  295. FSOUND_PlaySound
  296. FSOUND_PlaySoundEx
  297. FSOUND_Sample_Alloc
  298. FSOUND_Sample_Load
  299. FSOUND_SetPan
  300. ]
  301. *)
  302. const
  303. FSOUND_FREE = -1; // value to play on any free channel, or to allocate a sample in a free sample slot.
  304. FSOUND_UNMANAGED = -2; // value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot.
  305. FSOUND_ALL = -3; // for a channel index , this flag will affect ALL channels available! Not supported by every function.
  306. FSOUND_STEREOPAN = -1; // value for FSOUND_SetPan so that stereo sounds are not played at half volume. See FSOUND_SetPan for more on this.
  307. FSOUND_SYSTEMCHANNEL = -1000; // special 'channel' ID for all channel based functions that want to alter the global FSOUND software mixing output
  308. FSOUND_SYSTEMSAMPLE = -1000; // special 'sample' ID for all sample based functions that want to alter the global FSOUND software mixing output sample
  309. // [DEFINE_END]
  310. (*
  311. [STRUCT_START]
  312. [
  313. [NAME]
  314. FSOUND_REVERB_PROPERTIES
  315. [DESCRIPTION]
  316. Structure defining a reverb environment.
  317. [REMARKS]
  318. For more indepth descriptions of the reverb properties under win32, please see the EAX2/EAX3
  319. documentation at http://developer.creative.com/ under the 'downloads' section.
  320. If they do not have the EAX3 documentation, then most information can be attained from
  321. the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
  322. EAX2.
  323. Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
  324. Note that integer values that typically range from -10,000 to 1000 are represented in
  325. decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
  326. PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).
  327. Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
  328. the reverb should product a similar effect on either platform.
  329. Only WIN32 supports the reverb api.
  330. The numerical values listed below are the maximum, minimum and default values for each variable respectively.
  331. [SEE_ALSO]
  332. FSOUND_Reverb_SetProperties
  333. FSOUND_Reverb_GetProperties
  334. FSOUND_REVERB_PRESETS
  335. FSOUND_REVERB_FLAGS
  336. ]
  337. *)
  338. type
  339. TFSoundReverbProperties = record // MIN MAX DEFAULT DESCRIPTION
  340. Environment: Cardinal; // 0 25 0 sets all listener properties (win32 only)
  341. EnvSize: Single; // 1.0 100.0 7.5 environment size in meters (win32 only)
  342. EnvDiffusion: Single; // 0.0 1.0 1.0 environment diffusion (win32/xbox)
  343. Room: Integer; // -10000 0 -1000 room effect level (at mid frequencies) (win32/xbox)
  344. RoomHF: Integer; // -10000 0 -100 relative room effect level at high frequencies (win32/xbox)
  345. RoomLF: Integer; // -10000 0 0 relative room effect level at low frequencies (win32 only)
  346. DecayTime: Single; // 0.1 20.0 1.49 reverberation decay time at mid frequencies (win32/xbox)
  347. DecayHFRatio: Single; // 0.1 2.0 0.83 high-frequency to mid-frequency decay time ratio (win32/xbox)
  348. DecayLFRatio: Single; // 0.1 2.0 1.0 low-frequency to mid-frequency decay time ratio (win32 only)
  349. Reflections: Integer; // -10000 1000 -2602 early reflections level relative to room effect (win32/xbox)
  350. ReflectionsDelay: Single; // 0.0 0.3 0.007 initial reflection delay time (win32/xbox)
  351. ReflectionsPan: array [0..2] of Single; // 0,0,0 early reflections panning vector (win32 only)
  352. Reverb: Integer; // -10000 2000 200 late reverberation level relative to room effect (win32/xbox)
  353. ReverbDelay: Single; // 0.0 0.1 0.011 late reverberation delay time relative to initial reflection (win32/xbox)
  354. ReverbPan: array [0..2] of Single; // 0,0,0 late reverberation panning vector (win32 only)
  355. EchoTime: Single; // .075 0.25 0.25 echo time (win32 only)
  356. EchoDepth: Single; // 0.0 1.0 0.0 echo depth (win32 only)
  357. ModulationTime: Single; // 0.04 4.0 0.25 modulation time (win32 only)
  358. ModulationDepth: Single; // 0.0 1.0 0.0 modulation depth (win32 only)
  359. AirAbsorptionHF: Single; // -100 0.0 -5.0 change in level per meter at high frequencies (win32 only)
  360. HFReference: Single; // 1000.0 20000 5000.0 reference high frequency (hz) (win32/xbox)
  361. LFReference: Single; // 20.0 1000.0 250.0 reference low frequency (hz) (win32 only)
  362. RoomRolloffFactor: Single; // 0.0 10.0 0.0 like FSOUND_3D_SetRolloffFactor but for room effect (win32/xbox)
  363. Diffusion: Single; // 0.0 100.0 100.0 Value that controls the echo density in the late reverberation decay. (xbox only)
  364. Density: Single; // 0.0 100.0 100.0 Value that controls the modal density in the late reverberation decay (xbox only)
  365. Flags: Cardinal; // FSOUND_REVERB_PROPERTYFLAGS - modifies the behavior of above properties (win32 only)
  366. end;
  367. // [STRUCT_END]
  368. (*
  369. [DEFINE_START]
  370. [
  371. [NAME]
  372. FSOUND_REVERB_FLAGS
  373. [DESCRIPTION]
  374. Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
  375. [SEE_ALSO]
  376. FSOUND_REVERB_PROPERTIES
  377. ]
  378. *)
  379. const
  380. FSOUND_REVERBFLAGS_DECAYTIMESCALE = $00000001; // EnvironmentSize affects reverberation decay time
  381. FSOUND_REVERBFLAGS_REFLECTIONSSCALE = $00000002; // EnvironmentSize affects reflection level
  382. FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE = $00000004; // EnvironmentSize affects initial reflection delay time
  383. FSOUND_REVERBFLAGS_REVERBSCALE = $00000008; // EnvironmentSize affects reflections level
  384. FSOUND_REVERBFLAGS_REVERBDELAYSCALE = $00000010; // EnvironmentSize affects late reverberation delay time
  385. FSOUND_REVERBFLAGS_DECAYHFLIMIT = $00000020; // AirAbsorptionHF affects DecayHFRatio
  386. FSOUND_REVERBFLAGS_ECHOTIMESCALE = $00000040; // EnvironmentSize affects echo time
  387. FSOUND_REVERBFLAGS_MODULATIONTIMESCALE = $00000080; // EnvironmentSize affects modulation time
  388. FSOUND_REVERB_FLAGS_CORE0 = $00000100; // PS2 Only - Reverb is applied to CORE0 (hw voices 0-23)
  389. FSOUND_REVERB_FLAGS_CORE1 = $00000200; // PS2 Only - Reverb is applied to CORE1 (hw voices 24-47)
  390. FSOUND_REVERBFLAGS_DEFAULT = FSOUND_REVERBFLAGS_DECAYTIMESCALE or FSOUND_REVERBFLAGS_REFLECTIONSSCALE or
  391. FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE or FSOUND_REVERBFLAGS_REVERBSCALE or
  392. FSOUND_REVERBFLAGS_REVERBDELAYSCALE or FSOUND_REVERBFLAGS_DECAYHFLIMIT or
  393. FSOUND_REVERB_FLAGS_CORE0 or FSOUND_REVERB_FLAGS_CORE1;
  394. // [DEFINE_END]
  395. (*
  396. [DEFINE_START]
  397. [
  398. [NAME]
  399. FSOUND_REVERB_PRESETS
  400. [DESCRIPTION]
  401. A set of predefined environment PARAMETERS, created by Creative Labs
  402. These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
  403. ie
  404. FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
  405. [SEE_ALSO]
  406. FSOUND_Reverb_SetProperties
  407. ]
  408. *)
  409. (*
  410. const
  411. // 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
  412. 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 ;
  413. 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 ;
  414. 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 ;
  415. 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 ;
  416. 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 ;
  417. 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 ;
  418. 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 ;
  419. 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 ;
  420. 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 ;
  421. 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 ;
  422. 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 ;
  423. 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 ;
  424. 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 ;
  425. 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 ;
  426. 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 ;
  427. 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 ;
  428. 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 ;
  429. 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 ;
  430. 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 ;
  431. 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 ;
  432. 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 ;
  433. 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 ;
  434. 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 ;
  435. 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 ;
  436. // Non I3DL2 presets
  437. 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 ;
  438. 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 ;
  439. 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 ;
  440. *)
  441. // [DEFINE_END]
  442. (*
  443. [STRUCTURE]
  444. [
  445. [DESCRIPTION]
  446. Structure defining the properties for a reverb source, related to a FSOUND channel.
  447. For more indepth descriptions of the reverb properties under win32, please see the EAX3
  448. documentation at http://developer.creative.com/ under the 'downloads' section.
  449. If they do not have the EAX3 documentation, then most information can be attained from
  450. the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of
  451. EAX2.
  452. Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
  453. Note that integer values that typically range from -10,000 to 1000 are represented in
  454. decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
  455. PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).
  456. Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
  457. the reverb should product a similar effect on either platform.
  458. Linux and FMODCE do not support the reverb api.
  459. The numerical values listed below are the maximum, minimum and default values for each variable respectively.
  460. [SEE_ALSO]
  461. FSOUND_Reverb_SetChannelProperties
  462. FSOUND_Reverb_GetChannelProperties
  463. FSOUND_REVERB_CHANNELFLAGS
  464. ]
  465. *)
  466. type
  467. TFSoundReverbChannelProperties = record // MIN MAX DEFAULT
  468. Direct: Integer; // -10000 1000 0 direct path level (at low and mid frequencies) (win32/xbox)
  469. DirectHF: Integer; // -10000 0 0 relative direct path level at high frequencies (win32/xbox)
  470. Room: Integer; // -10000 1000 0 room effect level (at low and mid frequencies) (win32/xbox)
  471. RoomHF: Integer; // -10000 0 0 relative room effect level at high frequencies (win32/xbox)
  472. Obstruction: Integer; // -10000 0 0 main obstruction control (attenuation at high frequencies) (win32/xbox)
  473. ObstructionLFRatio: Single; // 0.0 1.0 0.0 obstruction low-frequency level re. main control (win32/xbox)
  474. Occlusion: Integer; // -10000 0 0 main occlusion control (attenuation at high frequencies) (win32/xbox)
  475. OcclusionLFRatio: Single; // 0.0 1.0 0.25 occlusion low-frequency level re. main control (win32/xbox)
  476. OcclusionRoomRatio: Single; // 0.0 10.0 1.5 relative occlusion control for room effect (win32)
  477. OcclusionDirectRatio: Single; // 0.0 10.0 1.0 relative occlusion control for direct path (win32)
  478. Exclusion: Integer; // -10000 0 0 main exlusion control (attenuation at high frequencies) (win32)
  479. ExclusionLFRatio: Single; // 0.0 1.0 1.0 exclusion low-frequency level re. main control (win32)
  480. OutsideVolumeHF: Integer; // -10000 0 0 outside sound cone level at high frequencies (win32)
  481. DopplerFactor: Single; // 0.0 10.0 0.0 like DS3D flDopplerFactor but per source (win32)
  482. RolloffFactor: Single; // 0.0 10.0 0.0 like DS3D flRolloffFactor but per source (win32)
  483. RoomRolloffFactor: Single; // 0.0 10.0 0.0 like DS3D flRolloffFactor but for room effect (win32/xbox)
  484. AirAbsorptionFactor: Single; // 0.0 10.0 1.0 multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (win32)
  485. Flags: Integer; // FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32)
  486. end;
  487. // [STRUCT_END]
  488. (*
  489. [DEFINE_START]
  490. [
  491. [NAME]
  492. FSOUND_REVERB_CHANNELFLAGS
  493. [DESCRIPTION]
  494. Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
  495. [SEE_ALSO]
  496. FSOUND_REVERB_CHANNELPROPERTIES
  497. ]
  498. *)
  499. const
  500. FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO = $01; // Automatic setting of 'Direct' due to distance from listener
  501. FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO = $02; // Automatic setting of 'Room' due to distance from listener
  502. FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO = $04; // Automatic setting of 'RoomHF' due to distance from listener
  503. FSOUND_REVERB_CHANNELFLAGS_DEFAULT = FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO or
  504. FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO or
  505. FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO;
  506. // [DEFINE_END]
  507. (*
  508. [ENUM]
  509. [
  510. [DESCRIPTION]
  511. These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
  512. [SEE_ALSO]
  513. FSOUND_FX_Enable
  514. FSOUND_FX_Disable
  515. FSOUND_FX_SetChorus
  516. FSOUND_FX_SetCompressor
  517. FSOUND_FX_SetDistortion
  518. FSOUND_FX_SetEcho
  519. FSOUND_FX_SetFlanger
  520. FSOUND_FX_SetGargle
  521. FSOUND_FX_SetI3DL2Reverb
  522. FSOUND_FX_SetParamEQ
  523. FSOUND_FX_SetWavesReverb
  524. ]
  525. *)
  526. type
  527. TFSoundFXModes = (
  528. FSOUND_FX_CHORUS,
  529. FSOUND_FX_COMPRESSOR,
  530. FSOUND_FX_DISTORTION,
  531. FSOUND_FX_ECHO,
  532. FSOUND_FX_FLANGER,
  533. FSOUND_FX_GARGLE,
  534. FSOUND_FX_I3DL2REVERB,
  535. FSOUND_FX_PARAMEQ,
  536. FSOUND_FX_WAVES_REVERB,
  537. FSOUND_FX_MAX
  538. );
  539. // [DEFINE_END]
  540. (*
  541. [ENUM]
  542. [
  543. [DESCRIPTION]
  544. These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
  545. Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only
  546. interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
  547. [SEE_ALSO]
  548. FSOUND_SetSpeakerMode
  549. [REMARKS]
  550. Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only
  551. interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
  552. Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
  553. ]
  554. *)
  555. type
  556. TFSoundSpeakerModes =
  557. (
  558. FSOUND_SPEAKERMODE_DOLBYDIGITAL, // The audio is played through a speaker arrangement of surround speakers with a subwoofer.
  559. FSOUND_SPEAKERMODE_HEADPHONES, // The speakers are headphones.
  560. FSOUND_SPEAKERMODE_MONO, // The speakers are monaural.
  561. FSOUND_SPEAKERMODE_QUAD, // The speakers are quadraphonic.
  562. FSOUND_SPEAKERMODE_STEREO, // The speakers are stereo (default value).
  563. FSOUND_SPEAKERMODE_SURROUND, // The speakers are surround sound.
  564. FSOUND_SPEAKERMODE_DTS // The audio is played through a speaker arrangement of surround speakers with a subwoofer.
  565. );
  566. FSOUND_SPEAKERMODES = TFSoundSpeakerModes;
  567. (*
  568. [DEFINE_START]
  569. [
  570. [NAME]
  571. FSOUND_INIT_FLAGS
  572. [DESCRIPTION]
  573. Initialization flags. Use them with FSOUND_Init in the flags parameter to change various behaviour.
  574. FSOUND_INIT_ENABLESYSTEMCHANNELFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
  575. Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
  576. This can be fixed with FSOUND_SetBufferSize. Increase the BufferSize until it works.
  577. When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
  578. [SEE_ALSO]
  579. FSOUND_Init
  580. ]
  581. *)
  582. const
  583. FSOUND_INIT_USEDEFAULTMIDISYNTH = $01; // Causes MIDI playback to force software decoding.
  584. FSOUND_INIT_GLOBALFOCUS = $02; // For DirectSound output - sound is not muted when window is out of focus.
  585. FSOUND_INIT_ENABLESYSTEMCHANNELFX = $04; // For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output!
  586. FSOUND_INIT_ACCURATEVULEVELS = $08; // This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit.
  587. FSOUND_INIT_PS2_DISABLECORE0REVERB = $10; // PS2 only - Disable reverb on CORE 0 to regain SRAM.
  588. FSOUND_INIT_PS2_DISABLECORE1REVERB = $20; // PS2 only - Disable reverb on CORE 1 to regain SRAM.
  589. FSOUND_INIT_PS2_SWAPDMACORES = $40; // PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around.
  590. FSOUND_INIT_DONTLATENCYADJUST = $80; // Callbacks are not latency adjusted, and are called at mix time. Also information functions are immediate.
  591. FSOUND_INIT_GC_INITLIBS = $100; // Gamecube only - Initializes GC audio libraries.
  592. FSOUND_INIT_STREAM_FROM_MAIN_THREAD = $200; // Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user.
  593. FSOUND_INIT_PS2_USEVOLUMERAMPING = $400; // PS2 only - Turns on volume ramping system to remove hardware clicks.
  594. FSOUND_INIT_DSOUND_DEFERRED = $800; // Win32 only - For DirectSound output. 3D commands are batched together and executed at FSOUND_Update.
  595. 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.
  596. 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.
  597. 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.
  598. 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.
  599. // [DEFINE_END]
  600. (*
  601. [ENUM]
  602. [
  603. [DESCRIPTION]
  604. Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream.
  605. [SEE_ALSO]
  606. FSOUND_Stream_Net_GetStatus
  607. ]
  608. *)
  609. type
  610. TFSoundStreamNetStatus =
  611. (
  612. FSOUND_STREAM_NET_NOTCONNECTED, (* Stream hasn't connected yet *)
  613. FSOUND_STREAM_NET_CONNECTING, (* Stream is connecting to remote host *)
  614. FSOUND_STREAM_NET_BUFFERING, (* Stream is buffering data *)
  615. FSOUND_STREAM_NET_READY, (* Stream is ready to play *)
  616. FSOUND_STREAM_NET_ERROR (* Stream has suffered a fatal error *)
  617. );
  618. (*
  619. [ENUM]
  620. [
  621. [DESCRIPTION]
  622. Describes the type of a particular tag field.
  623. [SEE_ALSO]
  624. FSOUND_Stream_GetNumTagFields
  625. FSOUND_Stream_GetTagField
  626. FSOUND_Stream_FindTagField
  627. ]
  628. *)
  629. type
  630. TFSoundTagFieldType =
  631. (
  632. FSOUND_TAGFIELD_VORBISCOMMENT, (* A vorbis comment *)
  633. FSOUND_TAGFIELD_ID3V1, (* Part of an ID3v1 tag *)
  634. FSOUND_TAGFIELD_ID3V2, (* An ID3v2 frame *)
  635. FSOUND_TAGFIELD_SHOUTCAST, (* A SHOUTcast header line *)
  636. FSOUND_TAGFIELD_ICECAST, (* An Icecast header line *)
  637. FSOUND_TAGFIELD_ASF (* An Advanced Streaming Format header line *)
  638. );
  639. (*
  640. [DEFINE_START]
  641. [
  642. [NAME]
  643. FSOUND_STATUS_FLAGS
  644. [DESCRIPTION]
  645. 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.
  646. [SEE_ALSO]
  647. FSOUND_Stream_Net_GetStatus
  648. ]
  649. *)
  650. const
  651. FSOUND_PROTOCOL_SHOUTCAST = $00000001;
  652. FSOUND_PROTOCOL_ICECAST = $00000002;
  653. FSOUND_PROTOCOL_HTTP = $00000004;
  654. FSOUND_FORMAT_MPEG = $00010000;
  655. FSOUND_FORMAT_OGGVORBIS = $00020000;
  656. (* [DEFINE_END] *)
  657. (*
  658. [STRUCTURE]
  659. [
  660. [DESCRIPTION]
  661. 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.
  662. 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.
  663. See the cdda example program for info on retrieving and using this structure.
  664. [SEE_ALSO]
  665. FSOUND_Stream_Open
  666. FSOUND_Stream_FindTagField
  667. ]
  668. *)
  669. type
  670. TFSoundTOCTag = record
  671. Name: array [0..3] of AnsiChar; // The string "TOC" (4th character is 0), just in case this structure is accidentally treated as a string.
  672. NumTracks: Integer; // The number of tracks on the CD.
  673. Min: array [0..99] of Integer; // The start offset of each track in minutes.
  674. Sec: array [0..99] of Integer; // The start offset of each track in seconds.
  675. Frame: array [0..99] of Integer; // The start offset of each track in frames.
  676. end;
  677. // [STRUCT_END]
  678. //----------------------------------------------
  679. implementation
  680. //----------------------------------------------
  681. end.