FMOD.Import.pas 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. //
  2. // The graphics engine GLScene
  3. //
  4. unit FMOD.Import;
  5. (*==============================================================================================
  6. FMOD Main 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. uses
  23. {$IFDEF MSWINDOWS}
  24. Winapi.Windows,
  25. {$ENDIF}
  26. FMOD.Types;
  27. const
  28. {$IFDEF WIN32}
  29. FMOD_DLL = 'fmod32.dll';
  30. {$ELSE}
  31. FMOD_DLL = 'fmod64.dll';
  32. {$ENDIF}
  33. {$IFDEF LINUX}
  34. FMOD_DLL = 'libfmod.so';
  35. {$ELSE}
  36. {$IFDEF DARWIN}
  37. FMOD_DLL = 'fmod.dylib';
  38. {$ENDIF}
  39. {$ENDIF}
  40. //===============================================================================================
  41. // FUNCTION PROTOTYPES
  42. //===============================================================================================
  43. // ==================================
  44. // Library load/unload functions.
  45. // ==================================
  46. (*
  47. If no library name is passed to FMOD_Load, then the default library name
  48. used. These are stub functions.
  49. *)
  50. function FMOD_Load(LibName: PChar): Boolean;
  51. procedure FMOD_Unload;
  52. // ==================================
  53. // Initialization / Global functions.
  54. // ==================================
  55. (*
  56. PRE - FSOUND_Init functions. These can't be called after FSOUND_Init is
  57. called (they will fail). They set up FMOD system functionality.
  58. *)
  59. function FSOUND_SetOutput(OutputType: TFSoundOutputTypes): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  60. function FSOUND_SetDriver(Driver: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  61. function FSOUND_SetMixer(Mixer: TFSoundMixerTypes): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  62. function FSOUND_SetBufferSize(LenMs: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  63. function FSOUND_SetHWND(Hwnd: THandle): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  64. function FSOUND_SetMinHardwareChannels(Min: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  65. function FSOUND_SetMaxHardwareChannels(Max: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  66. function FSOUND_SetMemorySystem(Pool: Pointer; PoolLen: Integer;
  67. UserAlloc: TFSoundAllocCallback;
  68. UserRealloc: TFSoundReallocCallback;
  69. UserFree: TFSoundFreeCallback): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  70. (*
  71. Main initialization / closedown functions.
  72. Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override
  73. with MIDI playback.
  74. : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter
  75. which window is in focus. (FSOUND_OUTPUT_DSOUND only)
  76. *)
  77. function FSOUND_Init(MixRate: Integer; MaxSoftwareChannels: Integer; Flags: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  78. procedure FSOUND_Close; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  79. (*
  80. Runtime system level functions
  81. *)
  82. procedure FSOUND_Update; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; // This is called to update 3d sound / non-realtime output
  83. procedure FSOUND_SetSpeakerMode(SpeakerMode: Cardinal); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  84. procedure FSOUND_SetSFXMasterVolume(Volume: Integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  85. procedure FSOUND_SetPanSeperation(PanSep: Single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  86. procedure FSOUND_File_SetCallbacks(OpenCallback: TFSoundOpenCallback;
  87. CloseCallback: TFSoundCloseCallback;
  88. ReadCallback: TFSoundReadCallback;
  89. SeekCallback: TFSoundSeekCallback;
  90. TellCallback: TFSoundTellCallback); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  91. (*
  92. System information functions
  93. *)
  94. function FSOUND_GetError: TFModErrors; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  95. function FSOUND_GetVersion: Single; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  96. function FSOUND_GetOutput: TFSoundOutputTypes; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  97. function FSOUND_GetOutputHandle: Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  98. function FSOUND_GetDriver: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  99. function FSOUND_GetMixer: TFSoundMixerTypes; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  100. function FSOUND_GetNumDrivers: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  101. function FSOUND_GetDriverName(Id: Integer): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  102. function FSOUND_GetDriverCaps(Id: Integer; var Caps: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  103. function FSOUND_GetOutputRate: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  104. function FSOUND_GetMaxChannels: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  105. function FSOUND_GetMaxSamples: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  106. //function FSOUND_GetSpeakerMode: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  107. function FSOUND_GetSFXMasterVolume: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  108. function FSOUND_GetNumHWChannels(var num2d: Integer; var num3d: Integer; var total: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  109. function FSOUND_GetChannelsPlaying: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  110. function FSOUND_GetCPUUsage: Single; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  111. procedure FSOUND_GetMemoryStats(var CurrentAlloced: Cardinal; var MaxAlloced: Cardinal); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  112. // ===================================
  113. // Sample management / load functions.
  114. // ===================================
  115. (*
  116. Sample creation and management functions
  117. Note : Use FSOUND_LOADMEMORY flag with FSOUND_Sample_Load to load from memory.
  118. Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data.
  119. *)
  120. function FSOUND_Sample_Load(Index: Integer; const NameOrData: PAnsiChar; Mode: Cardinal; Offset: Integer; Length: Integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  121. function FSOUND_Sample_Alloc(Index: Integer; Length: Integer; Mode: Cardinal; DefFreq: Integer; DefVol: Integer; DefPan: Integer; DefPri: Integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  122. procedure FSOUND_Sample_Free(Sptr: PFSoundSample); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  123. function FSOUND_Sample_Upload(Sptr: PFSoundSample; SrcData: Pointer; Mode: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  124. function FSOUND_Sample_Lock(Sptr: PFSoundSample; Offset: Integer; Length: Integer; var Ptr1: Pointer; var Ptr2: Pointer; var Len1: Cardinal; var Len2: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  125. function FSOUND_Sample_Unlock(Sptr: PFSoundSample; Ptr1: Pointer; Ptr2: Pointer; Len1: Cardinal; Len2: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  126. (*
  127. Sample control functions
  128. *)
  129. function FSOUND_Sample_SetMode(Sptr: PFSoundSample; Mode: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  130. function FSOUND_Sample_SetLoopPoints(Sptr: PFSoundSample; LoopStart, LoopEnd: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  131. function FSOUND_Sample_SetDefaults(Sptr: PFSoundSample; DefFreq, DefVol, DefPan, DefPri: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  132. function FSOUND_Sample_SetDefaultsEx(Sptr: PFSoundSample; DefFreq, DefVol, DefPan, DefPri, VarFreq, VarVol, VarPan: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  133. function FSOUND_Sample_SetMinMaxDistance(Sptr: PFSoundSample; Min, Max: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  134. function FSOUND_Sample_SetMaxPlaybacks(Sptr: PFSoundSample; Max: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  135. (*
  136. Sample information functions
  137. *)
  138. function FSOUND_Sample_Get(SampNo: Integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  139. function FSOUND_Sample_GetName(Sptr: PFSoundSample): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  140. function FSOUND_Sample_GetLength(Sptr: PFSoundSample): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  141. function FSOUND_Sample_GetLoopPoints(Sptr: PFSoundSample; var LoopStart: Integer; var LoopEnd: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  142. function FSOUND_Sample_GetDefaults(Sptr: PFSoundSample; var DefFreq: Integer; var DefVol: Integer; var DefPan: Integer; var DefPri: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  143. function FSOUND_Sample_GetDefaultsEx(Sptr: PFSoundSample; var DefFreq: Integer; var DefVol: Integer; var DefPan: Integer; var DefPri: Integer;var VarFreq: Integer; var VarVol: Integer; var VarPan: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  144. function FSOUND_Sample_GetMode(Sptr: PFSoundSample): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  145. function FSOUND_Sample_GetMinMaxDistance(Sptr: PFSoundSample; var Min: Single; var Max: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  146. // ============================
  147. // Channel control functions.
  148. // ============================
  149. (*
  150. Playing and stopping sounds.
  151. Note : Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
  152. Use FSOUND_ALL as the 'channel' variable to control ALL channels with one function call!
  153. *)
  154. function FSOUND_PlaySound(Channel: Integer; Sptr: PFSoundSample): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  155. function FSOUND_PlaySoundEx(Channel: Integer; Sptr: PFSoundSample; Dsp: PFSoundDSPUnit; StartPaused: ByteBool): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  156. function FSOUND_StopSound(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  157. (*
  158. Functions to control playback of a channel.
  159. Note : FSOUND_ALL can be used on most of these functions as a channel value.
  160. *)
  161. function FSOUND_SetFrequency(Channel: Integer; Freq: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  162. function FSOUND_SetVolume(Channel: Integer; Vol: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  163. function FSOUND_SetVolumeAbsolute(Channel: Integer; Vol: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  164. function FSOUND_SetPan(Channel: Integer; Pan: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  165. function FSOUND_SetSurround(Channel: Integer; Surround: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  166. function FSOUND_SetMute(Channel: Integer; Mute: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  167. function FSOUND_SetPriority(Channel: Integer; Priority: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  168. function FSOUND_SetReserved(Channel: Integer; Reserved: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  169. function FSOUND_SetPaused(Channel: Integer; Paused: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  170. function FSOUND_SetLoopMode(Channel: Integer; LoopMode: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  171. function FSOUND_SetCurrentPosition(Channel: Integer; Offset: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  172. function FSOUND_3D_SetAttributes(Channel: Integer; Pos: PFSoundVector; Vel: PFSoundVector): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  173. function FSOUND_3D_SetMinMaxDistance(Channel: Integer; Min: Single; Max: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  174. (*
  175. Channel information functions
  176. *)
  177. function FSOUND_IsPlaying(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  178. function FSOUND_GetFrequency(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  179. function FSOUND_GetVolume(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  180. function FSOUND_GetAmplitude(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  181. function FSOUND_GetPan(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  182. function FSOUND_GetSurround(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  183. function FSOUND_GetMute(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  184. function FSOUND_GetPriority(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  185. function FSOUND_GetReserved(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  186. function FSOUND_GetPaused(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  187. function FSOUND_GetLoopMode(Channel: Integer): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  188. function FSOUND_GetCurrentPosition(Channel: Integer): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  189. function FSOUND_GetCurrentSample(Channel: Integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  190. function FSOUND_GetCurrentLevels(Channel: Integer; l, r: PSingle): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  191. function FSOUND_GetNumSubChannels(Channel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  192. function FSOUND_GetSubChannel(Channel: Integer; SubChannel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  193. function FSOUND_3D_GetAttributes(Channel: Integer; Pos: PFSoundVector; Vel: PFSoundVector): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  194. function FSOUND_3D_GetMinMaxDistance(Channel: Integer; var Min: Single; var Max: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  195. // ===================
  196. // 3D sound functions.
  197. // ===================
  198. (*
  199. See also 3d sample and channel based functions above.
  200. Call FSOUND_Update once a frame to process 3d information.
  201. *)
  202. procedure FSOUND_3D_Listener_SetCurrent(current: Integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  203. procedure FSOUND_3D_Listener_SetAttributes(Pos: PFSoundVector; Vel: PFSoundVector;
  204. fx: Single; fy: Single; fz: Single;
  205. tx: Single; ty: Single; tz: Single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  206. procedure FSOUND_3D_Listener_GetAttributes(Pos: PFSoundVector; Vel: PFSoundVector;
  207. fx: PSingle; fy: PSingle; fz: PSingle;
  208. tx: PSingle; ty: PSingle; tz: PSingle); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  209. procedure FSOUND_3D_SetDopplerFactor(Scale: Single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  210. procedure FSOUND_3D_SetDistanceFactor(Scale: Single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  211. procedure FSOUND_3D_SetRolloffFactor(Scale: Single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  212. // ===================
  213. // FX functions.
  214. // ===================
  215. (*
  216. Functions to control DX8 only effects processing.
  217. - FX enabled samples can only be played once at a time, not multiple times at once.
  218. - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
  219. - FSOUND_INIT_ENABLESYSTEMCHANNELFX can be used to apply hardware effect processing to the
  220. global mixed output of FMOD's software channels.
  221. - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
  222. - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
  223. it will return a unique handle for each FX.
  224. - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
  225. - FSOUND_FX_Disable must be called to reset/clear the FX from a channel.
  226. *)
  227. function FSOUND_FX_Enable(Channel: Integer; Fx: TFSoundFXModes): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  228. function FSOUND_FX_Disable(Channel: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  229. function FSOUND_FX_SetChorus(FXId: Integer; WetDryMix, Depth, Feedback, Frequency: Single; Waveform: Integer; Delay: Single; Phase: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  230. function FSOUND_FX_SetCompressor(FXId: Integer; Gain, Attack, Release, Threshold, Ratio, Predelay: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  231. function FSOUND_FX_SetDistortion(FXId: Integer; Gain, Edge, PostEQCenterFrequency, PostEQBandwidth, PreLowpassCutoff: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  232. function FSOUND_FX_SetEcho(FXId: Integer; WetDryMix, Feedback, LeftDelay, RightDelay: Single; PanDelay: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  233. function FSOUND_FX_SetFlanger(FXId: Integer; WetDryMix, Depth, Feedback, Frequency: Single; Waveform: Integer; Delay: Single; Phase: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  234. function FSOUND_FX_SetGargle(FXId, RateHz, WaveShape: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  235. function FSOUND_FX_SetI3DL2Reverb(FXId, Room, RoomHF: Integer; RoomRolloffFactor, DecayTime, DecayHFRatio: Single; Reflections: Integer; ReflectionsDelay: Single; Reverb: Integer; ReverbDelay, Diffusion, Density, HFReference: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  236. function FSOUND_FX_SetParamEQ(FXId: Integer; Center, Bandwidth, Gain: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  237. function FSOUND_FX_SetWavesReverb(FXId: Integer; InGain, ReverbMix, ReverbTime, HighFreqRTRatio: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  238. // =========================
  239. // File Streaming functions.
  240. // =========================
  241. (*
  242. Note : Use FSOUND_LOADMEMORY flag with FSOUND_Stream_Open to stream from memory.
  243. Use FSOUND_LOADRAW flag with FSOUND_Stream_Open to treat stream as raw pcm data.
  244. Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_Open to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
  245. Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
  246. *)
  247. function FSOUND_Stream_SetBufferSize(Ms: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  248. function FSOUND_Stream_Open(const name_or_data: PAnsiChar; Mode: Cardinal; Offset: Integer; Length: Integer): PFSoundStream; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  249. function FSOUND_Stream_Create(Callback: TFSoundStreamCallback; Length: Integer; Mode: Cardinal; SampleRate: Integer; UserData: Integer): PFSoundStream; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  250. function FSOUND_Stream_Close(Stream: PFSoundStream): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  251. function FSOUND_Stream_Play(Channel: Integer; Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  252. function FSOUND_Stream_PlayEx(Channel: Integer; Stream: PFSoundStream; Dsp: PFSoundDSPUnit; StartPaused: ByteBool): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  253. function FSOUND_Stream_Stop(Stream: PFSoundStream): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  254. function FSOUND_Stream_SetPosition(Stream: PFSoundStream; Position: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  255. function FSOUND_Stream_GetPosition(Stream: PFSoundStream): Cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  256. function FSOUND_Stream_SetTime(Stream: PFSoundStream; Ms: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  257. function FSOUND_Stream_GetTime(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  258. function FSOUND_Stream_GetLength(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  259. function FSOUND_Stream_GetLengthMs(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  260. function FSOUND_Stream_SetMode(Stream: PFSoundStream; mode: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  261. function FSOUND_Stream_GetMode(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  262. function FSOUND_Stream_SetLoopPoints(Stream: PFSoundStream; LoopStartPCM, LoopEndPCM: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  263. function FSOUND_Stream_SetLoopCount(Stream: PFSoundStream; Count: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  264. function FSOUND_Stream_GetOpenState(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  265. function FSOUND_Stream_GetSample(Stream: PFSoundStream): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  266. function FSOUND_Stream_CreateDSP(Stream: PFSoundStream; Callback: TFSoundDSPCallback; Priority: Integer; Param: Integer): PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  267. function FSOUND_Stream_SetEndCallback(Stream: PFSoundStream; Callback: TFSoundStreamCallback; UserData: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  268. function FSOUND_Stream_SetSyncCallback(Stream: PFSoundStream; Callback: TFSoundStreamCallback; UserData: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  269. function FSOUND_Stream_AddSyncPoint(Stream: PFSoundStream; PCMOffset: Cardinal; Name: PAnsiChar): PFSyncPoint; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  270. function FSOUND_Stream_DeleteSyncPoint(Point: PFSyncPoint): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  271. function FSOUND_Stream_GetNumSyncPoints(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  272. function FSOUND_Stream_GetSyncPoint(Stream: PFSoundStream; Index: Integer): PFSyncPoint; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  273. function FSOUND_Stream_GetSyncPointInfo(Point: PFSyncPoint; var PCMOffset: Cardinal): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  274. function FSOUND_Stream_SetSubStream(Stream: PFSoundStream; Index: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  275. function FSOUND_Stream_GetNumSubStreams(Stream: PFSoundStream): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  276. function FSOUND_Stream_SetSubStreamSentence(Stream: PFSoundStream; var SentenceList: Cardinal; NumItems: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  277. function FSOUND_Stream_GetNumTagFields(Stream: PFSoundStream; var Num: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  278. function FSOUND_Stream_GetTagField(Stream: PFSoundStream; Num: Integer; var TagType: TFSoundTagFieldType; var Name: PAnsiChar; var Value: Pointer; var Length: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  279. function FSOUND_Stream_FindTagField(Stream: PFSoundStream; TagType: TFSoundTagFieldType; Name: PAnsiChar; var Value: Pointer; var Length: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  280. (*
  281. Internet streaming functions
  282. *)
  283. function FSOUND_Stream_Net_SetProxy(Proxy: PAnsiChar): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  284. function FSOUND_Stream_Net_GetLastServerStatus(): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  285. function FSOUND_Stream_Net_SetBufferProperties(BufferSize: Integer; PreBuffer_Percent: Integer; ReBuffer_Percent: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  286. function FSOUND_Stream_Net_GetBufferProperties(var Buffersize: Integer; var PreBuffer_Percent: Integer; var ReBuffer_Percent: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  287. function FSOUND_Stream_Net_SetMetadataCallback(Stream: PFSoundStream; Callback: TFMetaDataCallback; UserData: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  288. function FSOUND_Stream_Net_GetStatus(Stream: PFSoundStream; var Status: TFSoundStreamNetStatus; var BufferPercentUsed: Integer; var BitRate: Integer; var Flags: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  289. // ===================
  290. // CD audio functions.
  291. // ===================
  292. (*
  293. Note : 0 = default cdrom. Otherwise specify the drive letter, for example. 'D'.
  294. *)
  295. function FSOUND_CD_Play(Drive: Byte; Track: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  296. procedure FSOUND_CD_SetPlayMode(Drive: Byte; Mode: Integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  297. function FSOUND_CD_Stop(Drive: Byte): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  298. function FSOUND_CD_SetPaused(Drive: Byte; Paused: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  299. function FSOUND_CD_SetVolume(Drive: Byte; Volume: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  300. function FSOUND_CD_SetTrackTime(Drive: Byte; ms: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  301. function FSOUND_CD_OpenTray(Drive: Byte; Open: Byte): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  302. function FSOUND_CD_GetPaused(Drive: Byte): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  303. function FSOUND_CD_GetTrack(Drive: Byte): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  304. function FSOUND_CD_GetNumTracks(Drive: Byte): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  305. function FSOUND_CD_GetVolume(Drive: Byte): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  306. function FSOUND_CD_GetTrackLength(Drive: Byte; Track: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  307. function FSOUND_CD_GetTrackTime(Drive: Byte): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  308. // ==============
  309. // DSP functions.
  310. // ==============
  311. (*
  312. DSP Unit control and information functions.
  313. *)
  314. function FSOUND_DSP_Create(Callback: TFSoundDSPCallback; Priority: Integer; Param: Integer): PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  315. procedure FSOUND_DSP_Free(DSPUnit: PFSoundDSPUnit); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  316. procedure FSOUND_DSP_SetPriority(DSPUnit: PFSoundDSPUnit; Priority: Integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  317. function FSOUND_DSP_GetPriority(DSPUnit: PFSoundDSPUnit): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  318. procedure FSOUND_DSP_SetActive(DSPUnit: PFSoundDSPUnit; Active: ByteBool); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  319. function FSOUND_DSP_GetActive(DSPUnit: PFSoundDSPUnit): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  320. (*
  321. Functions to get hold of FSOUND 'system DSP unit' handles.
  322. *)
  323. function FSOUND_DSP_GetClearUnit: PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  324. function FSOUND_DSP_GetSFXUnit: PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  325. function FSOUND_DSP_GetMusicUnit: PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  326. function FSOUND_DSP_GetFFTUnit: PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  327. function FSOUND_DSP_GetClipAndCopyUnit: PFSoundDSPUnit; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  328. (*
  329. Miscellaneous DSP functions
  330. Note for the spectrum analysis function to work, you have to enable the FFT DSP unit with
  331. the following code FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);
  332. It is off by default to save cpu usage.
  333. *)
  334. function FSOUND_DSP_MixBuffers(DestBuffer: Pointer; SrcBuffer: Pointer; Len: Integer; Freq: Integer; Vol: Integer; Pan: Integer; Mode: Cardinal): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  335. procedure FSOUND_DSP_ClearMixBuffer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  336. function FSOUND_DSP_GetBufferLength: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; { Length of each DSP update }
  337. function FSOUND_DSP_GetBufferLengthTotal: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; { Total buffer length due to FSOUND_SetBufferSize }
  338. function FSOUND_DSP_GetSpectrum: PSingle; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; { Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. }
  339. // ==========================================================================
  340. // Reverb functions. (eax2/3 reverb) (NOT SUPPORTED IN LINUX/CE)
  341. // ==========================================================================
  342. (*
  343. See structures above for definitions and information on the reverb parameters.
  344. *)
  345. function FSOUND_Reverb_SetProperties(var Prop: TFSoundReverbProperties): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  346. function FSOUND_Reverb_GetProperties(var Prop: TFSoundReverbProperties): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  347. function FSOUND_Reverb_SetChannelProperties(Channel: Integer; var Prop: TFSoundReverbChannelProperties): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  348. function FSOUND_Reverb_GetChannelProperties(Channel: Integer; var Prop: TFSoundReverbChannelProperties): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  349. // ================================================
  350. // Recording functions (NOT SUPPORTED IN LINUX/MAC)
  351. // ================================================
  352. (*
  353. Recording initialization functions
  354. *)
  355. function FSOUND_Record_SetDriver(OutputType: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  356. function FSOUND_Record_GetNumDrivers: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  357. function FSOUND_Record_GetDriverName(Id: Integer): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  358. function FSOUND_Record_GetDriver: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  359. (*
  360. Recording functionality. Only one recording session will work at a time.
  361. *)
  362. function FSOUND_Record_StartSample(Sptr: PFSoundSample; Loop: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  363. function FSOUND_Record_Stop: ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  364. function FSOUND_Record_GetPosition: Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  365. // =============================================================================================
  366. // FMUSIC API (MOD,S3M,XM,IT,MIDI PLAYBACK)
  367. // =============================================================================================
  368. (*
  369. Song management / playback functions.
  370. *)
  371. function FMUSIC_LoadSong(const Name: PAnsiChar): PFMusicModule; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  372. function FMUSIC_LoadSongEx(Name_Or_Data: Pointer; Offset: Integer; Length: Integer; Mode: Cardinal; var SampleList: Integer; SampleListNum: Integer): PFMusicModule; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  373. function FMUSIC_GetOpenState(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  374. function FMUSIC_FreeSong(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  375. function FMUSIC_PlaySong(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  376. function FMUSIC_StopSong(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  377. procedure FMUSIC_StopAllSongs; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  378. function FMUSIC_SetZxxCallback(Module: PFMusicModule; Callback: TFMusicCallback): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  379. function FMUSIC_SetRowCallback(Module: PFMusicModule; Callback: TFMusicCallback; RowStep: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  380. function FMUSIC_SetOrderCallback(Module: PFMusicModule; Callback: TFMusicCallback; OrderStep: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  381. function FMUSIC_SetInstCallback(Module: PFMusicModule; Callback: TFMusicCallback; Instrument: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  382. function FMUSIC_SetSample(Module: PFMusicModule; SampNo: Integer; Sptr: PFSoundSample): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  383. function FMUSIC_SetUserData(Module: PFMusicModule; userdata: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  384. function FMUSIC_OptimizeChannels(Module: PFMusicModule; MaxChannels: Integer; MinVolume: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  385. (*
  386. Runtime song functions.
  387. *)
  388. function FMUSIC_SetReverb(Reverb: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  389. function FMUSIC_SetLooping(Module: PFMusicModule; Looping: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  390. function FMUSIC_SetOrder(Module: PFMusicModule; Order: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  391. function FMUSIC_SetPaused(Module: PFMusicModule; Pause: ByteBool): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  392. function FMUSIC_SetMasterVolume(Module: PFMusicModule; Volume: Integer): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  393. function FMUSIC_SetMasterSpeed(Module: PFMusicModule; speed: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  394. function FMUSIC_SetPanSeperation(Module: PFMusicModule; PanSep: Single): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  395. (*
  396. Static song information functions.
  397. *)
  398. function FMUSIC_GetName(Module: PFMusicModule): PAnsiChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  399. function FMUSIC_GetType(Module: PFMusicModule): TFMusicTypes; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  400. function FMUSIC_GetNumOrders(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  401. function FMUSIC_GetNumPatterns(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  402. function FMUSIC_GetNumInstruments(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  403. function FMUSIC_GetNumSamples(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  404. function FMUSIC_GetNumChannels(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  405. function FMUSIC_GetSample(Module: PFMusicModule; SampNo: Integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  406. function FMUSIC_GetPatternLength(Module: PFMusicModule; OrderNo: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  407. (*
  408. Runtime song information.
  409. *)
  410. function FMUSIC_IsFinished(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  411. function FMUSIC_IsPlaying(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  412. function FMUSIC_GetMasterVolume(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  413. function FMUSIC_GetGlobalVolume(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  414. function FMUSIC_GetOrder(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  415. function FMUSIC_GetPattern(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  416. function FMUSIC_GetSpeed(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  417. function FMUSIC_GetBPM(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  418. function FMUSIC_GetRow(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  419. function FMUSIC_GetPaused(Module: PFMusicModule): ByteBool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  420. function FMUSIC_GetTime(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  421. function FMUSIC_GetRealChannel(Module: PFMusicModule; modchannel: Integer): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  422. function FMUSIC_GetUserData(Module: PFMusicModule): Integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
  423. //--------------------------------------------
  424. implementation
  425. //--------------------------------------------
  426. (*
  427. Stub functions to allow applications to swap between static and dynamic with
  428. no code changes at all.
  429. *)
  430. function FMOD_Load(LibName: PChar): Boolean;
  431. begin
  432. Result := True;
  433. end;
  434. procedure FMOD_Unload;
  435. begin
  436. end;
  437. function FSOUND_SetOutput; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetOutput@4' {$ENDIF};
  438. function FSOUND_SetDriver; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetDriver@4' {$ENDIF};
  439. function FSOUND_SetMixer; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetMixer@4' {$ENDIF};
  440. function FSOUND_SetBufferSize; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetBufferSize@4' {$ENDIF};
  441. function FSOUND_SetHWND; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetHWND@4' {$ENDIF};
  442. function FSOUND_SetMinHardwareChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetMinHardwareChannels@4' {$ENDIF};
  443. function FSOUND_SetMaxHardwareChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetMaxHardwareChannels@4' {$ENDIF};
  444. function FSOUND_SetMemorySystem; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetMemorySystem@20' {$ENDIF};
  445. function FSOUND_Init; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Init@12' {$ENDIF};
  446. procedure FSOUND_Close; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Close@0' {$ENDIF};
  447. procedure FSOUND_Update; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Update@0' {$ENDIF};
  448. procedure FSOUND_SetSpeakerMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetSpeakerMode@4' {$ENDIF};
  449. procedure FSOUND_SetSFXMasterVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetSFXMasterVolume@4' {$ENDIF};
  450. procedure FSOUND_SetPanSeperation; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetPanSeperation@4' {$ENDIF};
  451. function FSOUND_GetError; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetError@0' {$ENDIF};
  452. function FSOUND_GetVersion; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetVersion@0' {$ENDIF};
  453. function FSOUND_GetOutput; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetOutput@0' {$ENDIF};
  454. function FSOUND_GetOutputHandle; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetOutputHandle@0' {$ENDIF};
  455. function FSOUND_GetDriver; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetDriver@0' {$ENDIF};
  456. function FSOUND_GetMixer; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetMixer@0' {$ENDIF};
  457. function FSOUND_GetNumDrivers; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetNumDrivers@0' {$ENDIF};
  458. function FSOUND_GetDriverName; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetDriverName@4' {$ENDIF};
  459. function FSOUND_GetDriverCaps; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetDriverCaps@8' {$ENDIF};
  460. function FSOUND_GetOutputRate; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetOutputRate@0' {$ENDIF};
  461. function FSOUND_GetMaxChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetMaxChannels@0' {$ENDIF};
  462. function FSOUND_GetMaxSamples; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetMaxSamples@0' {$ENDIF};
  463. //function FSOUND_GetSpeakerMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetSpeakerMode@0' {$ENDIF};
  464. function FSOUND_GetSFXMasterVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetSFXMasterVolume@0' {$ENDIF};
  465. function FSOUND_GetNumHWChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetNumHWChannels@12' {$ENDIF};
  466. function FSOUND_GetChannelsPlaying; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetChannelsPlaying@0' {$ENDIF};
  467. function FSOUND_GetCPUUsage; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetCPUUsage@0' {$ENDIF};
  468. procedure FSOUND_GetMemoryStats; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetMemoryStats@8' {$ENDIF};
  469. function FSOUND_Sample_Load; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Load@20' {$ENDIF};
  470. function FSOUND_Sample_Alloc; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Alloc@28' {$ENDIF};
  471. procedure FSOUND_Sample_Free; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Free@4' {$ENDIF};
  472. function FSOUND_Sample_Upload; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Upload@12' {$ENDIF};
  473. function FSOUND_Sample_Lock; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Lock@28' {$ENDIF};
  474. function FSOUND_Sample_Unlock; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Unlock@20' {$ENDIF};
  475. function FSOUND_Sample_SetMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetMode@8' {$ENDIF};
  476. function FSOUND_Sample_SetLoopPoints; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetLoopPoints@12' {$ENDIF};
  477. function FSOUND_Sample_SetDefaults; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetDefaults@20' {$ENDIF};
  478. function FSOUND_Sample_SetDefaultsEx; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetDefaultsEx@32' {$ENDIF};
  479. function FSOUND_Sample_SetMinMaxDistance; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetMinMaxDistance@12' {$ENDIF};
  480. function FSOUND_Sample_SetMaxPlaybacks; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_SetMaxPlaybacks@8' {$ENDIF};
  481. function FSOUND_Sample_Get; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_Get@4' {$ENDIF};
  482. function FSOUND_Sample_GetName; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetName@4' {$ENDIF};
  483. function FSOUND_Sample_GetLength; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetLength@4' {$ENDIF};
  484. function FSOUND_Sample_GetLoopPoints; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetLoopPoints@12' {$ENDIF};
  485. function FSOUND_Sample_GetDefaults; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetDefaults@20' {$ENDIF};
  486. function FSOUND_Sample_GetDefaultsEx; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetDefaultsEx@32' {$ENDIF};
  487. function FSOUND_Sample_GetMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetMode@4' {$ENDIF};
  488. function FSOUND_Sample_GetMinMaxDistance; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Sample_GetMinMaxDistance@12' {$ENDIF};
  489. function FSOUND_PlaySound; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_PlaySound@8' {$ENDIF};
  490. function FSOUND_PlaySoundEx; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_PlaySoundEx@16' {$ENDIF};
  491. function FSOUND_StopSound; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_StopSound@4' {$ENDIF};
  492. function FSOUND_SetFrequency; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetFrequency@8' {$ENDIF};
  493. function FSOUND_SetVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetVolume@8' {$ENDIF};
  494. function FSOUND_SetVolumeAbsolute; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetVolumeAbsolute@8' {$ENDIF};
  495. function FSOUND_SetPan; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetPan@8' {$ENDIF};
  496. function FSOUND_SetSurround; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetSurround@8' {$ENDIF};
  497. function FSOUND_SetMute; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetMute@8' {$ENDIF};
  498. function FSOUND_SetPriority; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetPriority@8' {$ENDIF};
  499. function FSOUND_SetReserved; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetReserved@8' {$ENDIF};
  500. function FSOUND_SetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetPaused@8' {$ENDIF};
  501. function FSOUND_SetLoopMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetLoopMode@8' {$ENDIF};
  502. function FSOUND_SetCurrentPosition; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_SetCurrentPosition@8' {$ENDIF};
  503. function FSOUND_3D_SetAttributes; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_SetAttributes@12' {$ENDIF};
  504. function FSOUND_3D_SetMinMaxDistance; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_SetMinMaxDistance@12' {$ENDIF};
  505. function FSOUND_IsPlaying; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_IsPlaying@4' {$ENDIF};
  506. function FSOUND_GetFrequency; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetFrequency@4' {$ENDIF};
  507. function FSOUND_GetVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetVolume@4' {$ENDIF};
  508. function FSOUND_GetAmplitude; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetAmplitude@4' {$ENDIF};
  509. function FSOUND_GetPan; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetPan@4' {$ENDIF};
  510. function FSOUND_GetSurround; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetSurround@4' {$ENDIF};
  511. function FSOUND_GetMute; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetMute@4' {$ENDIF};
  512. function FSOUND_GetPriority; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetPriority@4' {$ENDIF};
  513. function FSOUND_GetReserved; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetReserved@4' {$ENDIF};
  514. function FSOUND_GetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetPaused@4' {$ENDIF};
  515. function FSOUND_GetLoopMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetLoopMode@4' {$ENDIF};
  516. function FSOUND_GetCurrentPosition; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetCurrentPosition@4' {$ENDIF};
  517. function FSOUND_GetCurrentSample; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetCurrentSample@4' {$ENDIF};
  518. function FSOUND_GetCurrentLevels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetCurrentLevels@12' {$ENDIF};
  519. function FSOUND_GetNumSubChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetNumSubChannels@4' {$ENDIF};
  520. function FSOUND_GetSubChannel; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_GetSubChannel@8' {$ENDIF};
  521. function FSOUND_3D_GetAttributes; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_GetAttributes@12' {$ENDIF};
  522. function FSOUND_3D_GetMinMaxDistance; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_GetMinMaxDistance@12' {$ENDIF};
  523. procedure FSOUND_3D_Listener_SetCurrent; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_Listener_SetCurrent@8' {$ENDIF};
  524. procedure FSOUND_3D_Listener_SetAttributes; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_Listener_SetAttributes@32' {$ENDIF};
  525. procedure FSOUND_3D_Listener_GetAttributes; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_Listener_GetAttributes@32' {$ENDIF};
  526. procedure FSOUND_3D_SetDopplerFactor; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_SetDopplerFactor@4' {$ENDIF};
  527. procedure FSOUND_3D_SetDistanceFactor; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_SetDistanceFactor@4' {$ENDIF};
  528. procedure FSOUND_3D_SetRolloffFactor; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_3D_SetRolloffFactor@4' {$ENDIF};
  529. function FSOUND_FX_Enable; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_Enable@8' {$ENDIF};
  530. function FSOUND_FX_Disable; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_Disable@4' {$ENDIF};
  531. function FSOUND_FX_SetChorus; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetChorus@32' {$ENDIF};
  532. function FSOUND_FX_SetCompressor; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetCompressor@28' {$ENDIF};
  533. function FSOUND_FX_SetDistortion; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetDistortion@24' {$ENDIF};
  534. function FSOUND_FX_SetEcho; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetEcho@24' {$ENDIF};
  535. function FSOUND_FX_SetFlanger; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetFlanger@32' {$ENDIF};
  536. function FSOUND_FX_SetGargle; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetGargle@12' {$ENDIF};
  537. function FSOUND_FX_SetI3DL2Reverb; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetI3DL2Reverb@52' {$ENDIF};
  538. function FSOUND_FX_SetParamEQ; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetParamEQ@16' {$ENDIF};
  539. function FSOUND_FX_SetWavesReverb; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_FX_SetWavesReverb@20' {$ENDIF};
  540. function FSOUND_Stream_Open; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Open@16' {$ENDIF};
  541. function FSOUND_Stream_Create; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Create@20' {$ENDIF};
  542. function FSOUND_Stream_Play; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Play@8' {$ENDIF};
  543. function FSOUND_Stream_PlayEx; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_PlayEx@16' {$ENDIF};
  544. function FSOUND_Stream_Stop; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Stop@4' {$ENDIF};
  545. function FSOUND_Stream_Close; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Close@4' {$ENDIF};
  546. function FSOUND_Stream_SetEndCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetEndCallback@12' {$ENDIF};
  547. function FSOUND_Stream_SetSyncCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetSyncCallback@12' {$ENDIF};
  548. function FSOUND_Stream_GetSample; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetSample@4' {$ENDIF};
  549. function FSOUND_Stream_CreateDSP; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_CreateDSP@16' {$ENDIF};
  550. function FSOUND_Stream_SetBufferSize; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetBufferSize@4' {$ENDIF};
  551. function FSOUND_Stream_SetPosition; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetPosition@8' {$ENDIF};
  552. function FSOUND_Stream_GetPosition; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetPosition@4' {$ENDIF};
  553. function FSOUND_Stream_SetTime; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetTime@8' {$ENDIF};
  554. function FSOUND_Stream_GetTime; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetTime@4' {$ENDIF};
  555. function FSOUND_Stream_GetLength; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetLength@4' {$ENDIF};
  556. function FSOUND_Stream_GetLengthMs; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetLengthMs@4' {$ENDIF};
  557. function FSOUND_Stream_SetMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetMode@8' {$ENDIF};
  558. function FSOUND_Stream_GetMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetMode@4' {$ENDIF};
  559. function FSOUND_Stream_SetLoopPoints; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetLoopPoints@12' {$ENDIF};
  560. function FSOUND_Stream_SetLoopCount; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetLoopCount@8' {$ENDIF};
  561. function FSOUND_Stream_AddSyncPoint; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_AddSyncPoint@12' {$ENDIF};
  562. function FSOUND_Stream_DeleteSyncPoint; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_DeleteSyncPoint@4' {$ENDIF};
  563. function FSOUND_Stream_GetNumSyncPoints; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetNumSyncPoints@4' {$ENDIF};
  564. function FSOUND_Stream_GetSyncPoint; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetSyncPoint@8' {$ENDIF};
  565. function FSOUND_Stream_GetSyncPointInfo; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetSyncPointInfo@8' {$ENDIF};
  566. function FSOUND_Stream_GetOpenState; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetOpenState@4' {$ENDIF};
  567. function FSOUND_Stream_SetSubStream; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetSubStream@8' {$ENDIF};
  568. function FSOUND_Stream_GetNumSubStreams; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetNumSubStreams@4' {$ENDIF};
  569. function FSOUND_Stream_SetSubStreamSentence; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_SetSubStreamSentence@12' {$ENDIF};
  570. function FSOUND_Stream_GetNumTagFields; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetNumTagFields@8' {$ENDIF};
  571. function FSOUND_Stream_GetTagField; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_GetTagField@24' {$ENDIF};
  572. function FSOUND_Stream_FindTagField; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_FindTagField@20' {$ENDIF};
  573. function FSOUND_Stream_Net_SetProxy; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_SetProxy@4' {$ENDIF};
  574. function FSOUND_Stream_Net_GetLastServerStatus; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_GetLastServerStatus@0' {$ENDIF};
  575. function FSOUND_Stream_Net_SetBufferProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_SetBufferProperties@12' {$ENDIF};
  576. function FSOUND_Stream_Net_GetBufferProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_GetBufferProperties@12' {$ENDIF};
  577. function FSOUND_Stream_Net_SetMetadataCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_SetMetadataCallback@12' {$ENDIF};
  578. function FSOUND_Stream_Net_GetStatus; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Stream_Net_GetStatus@20' {$ENDIF};
  579. function FSOUND_CD_Play; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_Play@8' {$ENDIF};
  580. procedure FSOUND_CD_SetPlayMode; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_SetPlayMode@8' {$ENDIF};
  581. function FSOUND_CD_Stop; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_Stop@4' {$ENDIF};
  582. function FSOUND_CD_SetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_SetPaused@8' {$ENDIF};
  583. function FSOUND_CD_SetVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_SetVolume@8' {$ENDIF};
  584. function FSOUND_CD_SetTrackTime; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_SetTrackTime@8' {$ENDIF};
  585. function FSOUND_CD_OpenTray; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_OpenTray@8' {$ENDIF};
  586. function FSOUND_CD_GetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetPaused@4' {$ENDIF};
  587. function FSOUND_CD_GetTrack; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetTrack@4' {$ENDIF};
  588. function FSOUND_CD_GetNumTracks; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetNumTracks@4' {$ENDIF};
  589. function FSOUND_CD_GetVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetVolume@4' {$ENDIF};
  590. function FSOUND_CD_GetTrackLength; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetTrackLength@8' {$ENDIF};
  591. function FSOUND_CD_GetTrackTime; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_CD_GetTrackTime@4' {$ENDIF};
  592. function FSOUND_DSP_Create; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_Create@12' {$ENDIF};
  593. procedure FSOUND_DSP_Free; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_Free@4' {$ENDIF};
  594. procedure FSOUND_DSP_SetPriority; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_SetPriority@8' {$ENDIF};
  595. function FSOUND_DSP_GetPriority; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetPriority@4' {$ENDIF};
  596. procedure FSOUND_DSP_SetActive; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_SetActive@8' {$ENDIF};
  597. function FSOUND_DSP_GetActive; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetActive@4' {$ENDIF};
  598. function FSOUND_DSP_GetClearUnit; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetClearUnit@0' {$ENDIF};
  599. function FSOUND_DSP_GetSFXUnit; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetSFXUnit@0' {$ENDIF};
  600. function FSOUND_DSP_GetMusicUnit; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetMusicUnit@0' {$ENDIF};
  601. function FSOUND_DSP_GetClipAndCopyUnit; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetClipAndCopyUnit@0' {$ENDIF};
  602. function FSOUND_DSP_GetFFTUnit; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetFFTUnit@0' {$ENDIF};
  603. function FSOUND_DSP_MixBuffers; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_MixBuffers@28' {$ENDIF};
  604. procedure FSOUND_DSP_ClearMixBuffer; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_ClearMixBuffer@0' {$ENDIF};
  605. function FSOUND_DSP_GetBufferLength; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetBufferLength@0' {$ENDIF};
  606. function FSOUND_DSP_GetBufferLengthTotal; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetBufferLengthTotal@0' {$ENDIF};
  607. function FSOUND_DSP_GetSpectrum; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_DSP_GetSpectrum@0' {$ENDIF};
  608. function FSOUND_Reverb_SetProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Reverb_SetProperties@4' {$ENDIF};
  609. function FSOUND_Reverb_GetProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Reverb_GetProperties@4' {$ENDIF};
  610. function FSOUND_Reverb_SetChannelProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Reverb_SetChannelProperties@8' {$ENDIF};
  611. function FSOUND_Reverb_GetChannelProperties; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Reverb_GetChannelProperties@8' {$ENDIF};
  612. function FSOUND_Record_SetDriver; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_SetDriver@4' {$ENDIF};
  613. function FSOUND_Record_GetNumDrivers; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_GetNumDrivers@0' {$ENDIF};
  614. function FSOUND_Record_GetDriverName; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_GetDriverName@4' {$ENDIF};
  615. function FSOUND_Record_GetDriver; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_GetDriver@0' {$ENDIF};
  616. function FSOUND_Record_StartSample; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_StartSample@8' {$ENDIF};
  617. function FSOUND_Record_Stop; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_Stop@0' {$ENDIF};
  618. function FSOUND_Record_GetPosition; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_Record_GetPosition@0' {$ENDIF};
  619. procedure FSOUND_File_SetCallbacks; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FSOUND_File_SetCallbacks@20' {$ENDIF};
  620. function FMUSIC_LoadSong; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_LoadSong@4' {$ENDIF};
  621. function FMUSIC_LoadSongEx; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_LoadSongEx@24' {$ENDIF};
  622. function FMUSIC_GetOpenState; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetOpenState@4' {$ENDIF};
  623. function FMUSIC_FreeSong; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_FreeSong@4' {$ENDIF};
  624. function FMUSIC_PlaySong; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_PlaySong@4' {$ENDIF};
  625. function FMUSIC_StopSong; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_StopSong@4' {$ENDIF};
  626. procedure FMUSIC_StopAllSongs; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_StopAllSongs@0' {$ENDIF};
  627. function FMUSIC_SetZxxCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetZxxCallback@8' {$ENDIF};
  628. function FMUSIC_SetRowCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetRowCallback@12' {$ENDIF};
  629. function FMUSIC_SetOrderCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetOrderCallback@12' {$ENDIF};
  630. function FMUSIC_SetInstCallback; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetInstCallback@12' {$ENDIF};
  631. function FMUSIC_SetSample; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetSample@12' {$ENDIF};
  632. function FMUSIC_SetUserData; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetUserData@8' {$ENDIF};
  633. function FMUSIC_OptimizeChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_OptimizeChannels@12' {$ENDIF};
  634. function FMUSIC_SetReverb; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetReverb@4' {$ENDIF};
  635. function FMUSIC_SetLooping; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetLooping@8' {$ENDIF};
  636. function FMUSIC_SetOrder; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetOrder@8' {$ENDIF};
  637. function FMUSIC_SetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetPaused@8' {$ENDIF};
  638. function FMUSIC_SetMasterVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetMasterVolume@8' {$ENDIF};
  639. function FMUSIC_SetMasterSpeed; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetMasterSpeed@8' {$ENDIF};
  640. function FMUSIC_SetPanSeperation; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_SetPanSeperation@8' {$ENDIF};
  641. function FMUSIC_GetName; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetName@4' {$ENDIF};
  642. function FMUSIC_GetType; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetType@4' {$ENDIF};
  643. function FMUSIC_GetNumOrders; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetNumOrders@4' {$ENDIF};
  644. function FMUSIC_GetNumPatterns; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetNumPatterns@4' {$ENDIF};
  645. function FMUSIC_GetNumInstruments; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetNumInstruments@4' {$ENDIF};
  646. function FMUSIC_GetNumSamples; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetNumSamples@4' {$ENDIF};
  647. function FMUSIC_GetNumChannels; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetNumChannels@4' {$ENDIF};
  648. function FMUSIC_GetSample; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetSample@8' {$ENDIF};
  649. function FMUSIC_GetPatternLength; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetPatternLength@8' {$ENDIF};
  650. function FMUSIC_IsFinished; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_IsFinished@4' {$ENDIF};
  651. function FMUSIC_IsPlaying; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_IsPlaying@4' {$ENDIF};
  652. function FMUSIC_GetMasterVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetMasterVolume@4' {$ENDIF};
  653. function FMUSIC_GetGlobalVolume; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetGlobalVolume@4' {$ENDIF};
  654. function FMUSIC_GetOrder; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetOrder@4' {$ENDIF};
  655. function FMUSIC_GetPattern; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetPattern@4' {$ENDIF};
  656. function FMUSIC_GetSpeed; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetSpeed@4' {$ENDIF};
  657. function FMUSIC_GetBPM; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetBPM@4' {$ENDIF};
  658. function FMUSIC_GetRow; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetRow@4' {$ENDIF};
  659. function FMUSIC_GetPaused; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetPaused@4' {$ENDIF};
  660. function FMUSIC_GetTime; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetTime@4' {$ENDIF};
  661. function FMUSIC_GetRealChannel; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetRealChannel@8' {$ENDIF};
  662. function FMUSIC_GetUserData; external FMOD_DLL {$IFDEF MSWINDOWS} name '_FMUSIC_GetUserData@4' {$ENDIF};
  663. var
  664. Saved8087CW: Word;
  665. //---------------------------------------------
  666. initialization
  667. //---------------------------------------------
  668. // Save the current FPU state and then disable FPU exceptions
  669. Saved8087CW := Default8087CW;
  670. Set8087CW($133f); // Disable all fpu exceptions
  671. finalization
  672. // Reset the FPU to the previous state
  673. Set8087CW(Saved8087CW);
  674. end.