소스 검색

Added GLS. before corresponding dws units

GLScene 4 년 전
부모
커밋
fae56a7045
82개의 변경된 파일482개의 추가작업 그리고 3065개의 파일을 삭제
  1. 1 1
      Demos/Delphi/rendering/basicsdl/Unit1.pas
  2. 2 2
      Packages/GLScene_Cg_RT.dpk
  3. 2 2
      Packages/GLScene_Cg_RT.dproj
  4. 6 6
      Packages/GLScene_GPU_RT.dpk
  5. 6 6
      Packages/GLScene_GPU_RT.dproj
  6. 6 6
      Packages/GLScene_Physics_RT.dpk
  7. 6 6
      Packages/GLScene_Physics_RT.dproj
  8. 1 1
      Packages/GLScene_SDL_DT.dpk
  9. 2 2
      Packages/GLScene_SDL_DT.dproj
  10. 2 2
      Packages/GLScene_SDL_RT.dpk
  11. 3 3
      Packages/GLScene_SDL_RT.dproj
  12. 1 1
      Packages/GLScene_Scripts_DT.dpk
  13. 5 5
      Packages/GLScene_Scripts_DT.dproj
  14. 7 7
      Packages/GLScene_Scripts_RT.dpk
  15. 11 11
      Packages/GLScene_Scripts_RT.dproj
  16. 6 6
      Packages/GLScene_Sounds_RT.dpk
  17. 6 6
      Packages/GLScene_Sounds_RT.dproj
  18. 0 1
      Source/GLS.Behaviours.pas
  19. 0 1
      Source/GLS.FileASE.pas
  20. 1 1
      Source/GLS.FilePGM.pas
  21. 268 0
      Source/GLS.PythonScript.pas
  22. 5 6
      Source/GLS.SDL2Frame.pas
  23. 2 3
      Source/GLS.SDLContext.pas
  24. 1 2
      Source/GLS.SDLWindow.pas
  25. 1 2
      Source/GLS.dwsClasses.pas
  26. 1 2
      Source/GLS.dwsHelperFunc.pas
  27. 2 5
      Source/GLS.dwsObjects.pas
  28. 1 4
      Source/GLS.dwsOpenGL.pas
  29. 2 3
      Source/GLS.dwsScene.pas
  30. 1 2
      Source/GLS.dwsScript.pas
  31. 2 3
      Source/GLS.dwsVectorGeometry.pas
  32. 1 2
      Source/GLSL.CgBombShader.pas
  33. 2 3
      Source/GLSL.CgPostTransformationShader.pas
  34. 2 3
      Source/GLSL.CgRegister.pas
  35. 2 3
      Source/GLSL.CgShader.pas
  36. 2 2
      Source/GPU.CUDA.pas
  37. 2 2
      Source/GPU.CUDAContext.pas
  38. 1 1
      Source/GPU.CUDAFFTPlan.pas
  39. 2 2
      Source/GPU.CUDAFourierTransform.pas
  40. 1 1
      Source/GPU.CUDAGraphics.pas
  41. 1 1
      Source/GPU.CUDAParser.pas
  42. 1 1
      Source/GPU.CUDAPropEditors.pas
  43. 1 1
      Source/GPU.CUDARuntime.pas
  44. 0 695
      Source/Import.CUDARuntime.pas
  45. 0 1220
      Source/Import.FMODdyn.pas
  46. 1 1
      Source/Imports.BASS.pas
  47. 1 1
      Source/Imports.CUDAApi.pas
  48. 1 1
      Source/Imports.CUDAParallelPrimitives.pas
  49. 1 1
      Source/Imports.CUDAUtility.pas
  50. 46 46
      Source/Imports.Cg.pas
  51. 2 2
      Source/Imports.CgGL.pas
  52. 2 3
      Source/Imports.FMOD.pas
  53. 5 6
      Source/Imports.FMODerrors.pas
  54. 5 6
      Source/Imports.FMODpresets.pas
  55. 1 2
      Source/Imports.FMODtypes.pas
  56. 1 2
      Source/Imports.ModuleLoader.pas
  57. 1 2
      Source/Imports.NGD.pas
  58. 2 3
      Source/Imports.NGD_Joints.pas
  59. 1 1
      Source/Imports.Newton.pas
  60. 2 3
      Source/Imports.ODE.pas
  61. 1 1
      Source/Imports.OpenAL.pas
  62. 2 2
      Source/Imports.OpenCL.pas
  63. 3 3
      Source/Imports.OpenCL_GL.pas
  64. 1 1
      Source/Imports.OpenCL_Platform.pas
  65. 1 2
      Source/Imports.PhysX.pas
  66. 1 1
      Source/Imports.SDL2.pas
  67. 3 3
      Source/Imports.SDL2Image.pas
  68. 2 2
      Source/Imports.SDL2Mixer.pas
  69. 2 2
      Source/Imports.SDL2Net.pas
  70. 2 2
      Source/Imports.SDL2Ttf.pas
  71. 3 3
      Source/Physics.NGDManager.pas
  72. 1 2
      Source/Physics.NGDRagdoll.pas
  73. 1 1
      Source/Physics.ODEManager.pas
  74. 1 2
      Source/Physics.ODERagdoll.pas
  75. 1 1
      Source/Physics.ODESkeletonColliders.pas
  76. 2 3
      Source/Physics.ODEUtils.pas
  77. 0 1
      Source/Physics.Register.pas
  78. 0 316
      Source/SDL.Context.pas
  79. 0 587
      Source/SDL.Window.pas
  80. 1 1
      Source/Sounds.BASS.pas
  81. 3 3
      Source/Sounds.FMOD.pas
  82. 1 1
      Source/Sounds.OpenAL.pas

+ 1 - 1
Demos/Delphi/rendering/basicsdl/Unit1.pas

@@ -19,7 +19,7 @@ uses
   GLS.Utils,
 
   GLS.SDLContext,
-  Import.SDL2;
+  Imports.SDL2;
 
 type
   TDataModule1 = class(TDataModule)

+ 2 - 2
Packages/GLScene_Cg_RT.dpk

@@ -36,8 +36,8 @@ requires
   GLScene_RT;
 
 contains
-  Import.cgGL in '..\Source\Import.cgGL.pas',
-  Import.cg in '..\Source\Import.cg.pas',
+  Imports.CgGL in '..\Source\Imports.CgGL.pas',
+  Imports.Cg in '..\Source\Imports.Cg.pas',
   GLSL.CgShader in '..\Source\GLSL.CgShader.pas',
   GLSL.CgBombShader in '..\Source\GLSL.CgBombShader.pas',
   GLSL.CgPostTransformationShader in '..\Source\GLSL.CgPostTransformationShader.pas';

+ 2 - 2
Packages/GLScene_Cg_RT.dproj

@@ -132,8 +132,8 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="vclimg.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\Source\Import.cgGL.pas"/>
-        <DCCReference Include="..\Source\Import.cg.pas"/>
+        <DCCReference Include="..\Source\Imports.CgGL.pas"/>
+        <DCCReference Include="..\Source\Imports.Cg.pas"/>
         <DCCReference Include="..\Source\GLSL.CgShader.pas"/>
         <DCCReference Include="..\Source\GLSL.CgBombShader.pas"/>
         <DCCReference Include="..\Source\GLSL.CgPostTransformationShader.pas"/>

+ 6 - 6
Packages/GLScene_GPU_RT.dpk

@@ -37,9 +37,9 @@ requires
   GLScene_RT;
 
 contains
-  Import.CUDAApi in '..\Source\Import.CUDAApi.pas',
-  Import.CUDAUtility in '..\Source\Import.CUDAUtility.pas',
-  Import.CUDAParallelPrimitives in '..\Source\Import.CUDAParallelPrimitives.pas',
+  Imports.CUDAApi in '..\Source\Imports.CUDAApi.pas',
+  Imports.CUDAUtility in '..\Source\Imports.CUDAUtility.pas',
+  Imports.CUDAParallelPrimitives in '..\Source\Imports.CUDAParallelPrimitives.pas',
   GPU.CUDARuntime in '..\Source\GPU.CUDARuntime.pas',
   GPU.CUDAFourierTransform in '..\Source\GPU.CUDAFourierTransform.pas',
   GPU.CUDACompiler in '..\Source\GPU.CUDACompiler.pas',
@@ -50,9 +50,9 @@ contains
   GPU.CUDADataAccess in '..\Source\GPU.CUDADataAccess.pas',
   GPU.CUDA in '..\Source\GPU.CUDA.pas',
   GLS.FilePGM in '..\Source\GLS.FilePGM.pas',
-  Import.OpenCL in '..\Source\Import.OpenCL.pas',
-  Import.OpenCL_GL in '..\Source\Import.OpenCL_GL.pas',
-  Import.OpenCL_Platform in '..\Source\Import.OpenCL_Platform.pas';
+  Imports.OpenCL in '..\Source\Imports.OpenCL.pas',
+  Imports.OpenCL_GL in '..\Source\Imports.OpenCL_GL.pas',
+  Imports.OpenCL_Platform in '..\Source\Imports.OpenCL_Platform.pas';
 
 end.
 

+ 6 - 6
Packages/GLScene_GPU_RT.dproj

@@ -133,9 +133,9 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="xmlrtl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\Source\Import.CUDAApi.pas"/>
-        <DCCReference Include="..\Source\Import.CUDAUtility.pas"/>
-        <DCCReference Include="..\Source\Import.CUDAParallelPrimitives.pas"/>
+        <DCCReference Include="..\Source\Imports.CUDAApi.pas"/>
+        <DCCReference Include="..\Source\Imports.CUDAUtility.pas"/>
+        <DCCReference Include="..\Source\Imports.CUDAParallelPrimitives.pas"/>
         <DCCReference Include="..\Source\GPU.CUDARuntime.pas"/>
         <DCCReference Include="..\Source\GPU.CUDAFourierTransform.pas"/>
         <DCCReference Include="..\Source\GPU.CUDACompiler.pas"/>
@@ -146,9 +146,9 @@
         <DCCReference Include="..\Source\GPU.CUDADataAccess.pas"/>
         <DCCReference Include="..\Source\GPU.CUDA.pas"/>
         <DCCReference Include="..\Source\GLS.FilePGM.pas"/>
-        <DCCReference Include="..\Source\Import.OpenCL.pas"/>
-        <DCCReference Include="..\Source\Import.OpenCL_GL.pas"/>
-        <DCCReference Include="..\Source\Import.OpenCL_Platform.pas"/>
+        <DCCReference Include="..\Source\Imports.OpenCL.pas"/>
+        <DCCReference Include="..\Source\Imports.OpenCL_GL.pas"/>
+        <DCCReference Include="..\Source\Imports.OpenCL_Platform.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>

+ 6 - 6
Packages/GLScene_Physics_RT.dpk

@@ -35,11 +35,11 @@ requires
   GLScene_RT;
 
 contains
-  Import.ModuleLoader in '..\Source\Import.ModuleLoader.pas',
-  Import.NGD in '..\Source\Import.NGD.pas',
-  Import.NGD_Joints in '..\Source\Import.NGD_Joints.pas',
-  Import.ODE in '..\Source\Import.ODE.pas',
-  Import.PhysX in '..\Source\Import.PhysX.pas',
+  Imports.ModuleLoader in '..\Source\Imports.ModuleLoader.pas',
+  Imports.NGD in '..\Source\Imports.NGD.pas',
+  Imports.NGD_Joints in '..\Source\Imports.NGD_Joints.pas',
+  Imports.ODE in '..\Source\Imports.ODE.pas',
+  Imports.PhysX in '..\Source\Imports.PhysX.pas',
   Physics.NGDManager in '..\Source\Physics.NGDManager.pas',
   Physics.NGDRagdoll in '..\Source\Physics.NGDRagdoll.pas',
   Physics.ODEManager in '..\Source\Physics.ODEManager.pas',
@@ -51,7 +51,7 @@ contains
   Physics.SPIInertias in '..\Source\Physics.SPIInertias.pas',
   Physics.SPIJoints in '..\Source\Physics.SPIJoints.pas',
   Physics.SPIManager in '..\Source\Physics.SPIManager.pas',
-  Import.Newton in '..\Source\Import.Newton.pas';
+  Imports.Newton in '..\Source\Imports.Newton.pas';
 
 end.
 

+ 6 - 6
Packages/GLScene_Physics_RT.dproj

@@ -149,11 +149,11 @@
         <DCCReference Include="rtl.dcp"/>
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\Source\Import.ModuleLoader.pas"/>
-        <DCCReference Include="..\Source\Import.NGD.pas"/>
-        <DCCReference Include="..\Source\Import.NGD_Joints.pas"/>
-        <DCCReference Include="..\Source\Import.ODE.pas"/>
-        <DCCReference Include="..\Source\Import.PhysX.pas"/>
+        <DCCReference Include="..\Source\Imports.ModuleLoader.pas"/>
+        <DCCReference Include="..\Source\Imports.NGD.pas"/>
+        <DCCReference Include="..\Source\Imports.NGD_Joints.pas"/>
+        <DCCReference Include="..\Source\Imports.ODE.pas"/>
+        <DCCReference Include="..\Source\Imports.PhysX.pas"/>
         <DCCReference Include="..\Source\Physics.NGDManager.pas"/>
         <DCCReference Include="..\Source\Physics.NGDRagdoll.pas"/>
         <DCCReference Include="..\Source\Physics.ODEManager.pas"/>
@@ -165,7 +165,7 @@
         <DCCReference Include="..\Source\Physics.SPIInertias.pas"/>
         <DCCReference Include="..\Source\Physics.SPIJoints.pas"/>
         <DCCReference Include="..\Source\Physics.SPIManager.pas"/>
-        <DCCReference Include="..\Source\Import.Newton.pas"/>
+        <DCCReference Include="..\Source\Imports.Newton.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>

+ 1 - 1
Packages/GLScene_SDL_DT.dpk

@@ -39,7 +39,7 @@ requires
   GLScene_SDL_RT;
 
 contains
-  SDL.Context in '..\Source\SDL.Context.pas';
+  GLS.SDLContext in '..\Source\GLS.SDLContext.pas';
 
 end.
 

+ 2 - 2
Packages/GLScene_SDL_DT.dproj

@@ -113,7 +113,7 @@
         <DCCReference Include="vclimg.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
         <DCCReference Include="GLScene_SDL_RT.dcp"/>
-        <DCCReference Include="..\Source\SDL.Context.pas"/>
+        <DCCReference Include="..\Source\GLS.SDLContext.pas"/>
         <RcCompile Include="..\Resources\GLSceneSDL.rc">
             <Form>GLSceneSDL.res</Form>
         </RcCompile>
@@ -149,7 +149,7 @@
                 <Platform value="Win64">False</Platform>
             </Platforms>
             <Deployment Version="3">
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\GLScene_SDL_DT.bpl" Configuration="Debug" Class="ProjectOutput">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\GLScene_SDL_DT.bpl" Configuration="Debug" Class="ProjectOutput">
                     <Platform Name="Win32">
                         <RemoteName>GLScene_SDL_DT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>

+ 2 - 2
Packages/GLScene_SDL_RT.dpk

@@ -35,8 +35,8 @@ requires
   GLScene_RT;
 
 contains
-  Import.SDL2 in '..\Source\Import.SDL2.pas',
-  SDL.Window in '..\Source\SDL.Window.pas';
+  Imports.SDL2 in '..\Source\Imports.SDL2.pas',
+  GLS.SDLWindow in '..\Source\GLS.SDLWindow.pas';
 
 end.
 

+ 3 - 3
Packages/GLScene_SDL_RT.dproj

@@ -144,8 +144,8 @@
         <DCCReference Include="rtl.dcp"/>
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\Source\Import.SDL2.pas"/>
-        <DCCReference Include="..\Source\SDL.Window.pas"/>
+        <DCCReference Include="..\Source\Imports.SDL2.pas"/>
+        <DCCReference Include="..\Source\GLS.SDLWindow.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>
@@ -178,7 +178,7 @@
                 <Platform value="Win64">True</Platform>
             </Platforms>
             <Deployment Version="3">
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\GLScene_SDL_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\GLScene_SDL_RT.bpl" Configuration="Debug" Class="ProjectOutput">
                     <Platform Name="Win32">
                         <RemoteName>GLScene_SDL_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>

+ 1 - 1
Packages/GLScene_Scripts_DT.dpk

@@ -38,6 +38,6 @@ requires
   GLScene_Scripts_RT;
 
 contains
-  DWS.Scene in '..\Source\DWS.Scene.pas';
+  GLS.dwsScene in '..\Source\GLS.dwsScene.pas';
 
 end.

+ 5 - 5
Packages/GLScene_Scripts_DT.dproj

@@ -106,7 +106,7 @@
         <DCCReference Include="DWS.Runtime.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
         <DCCReference Include="GLScene_Scripts_RT.dcp"/>
-        <DCCReference Include="..\Source\DWS.Scene.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsScene.pas"/>
         <RcCompile Include="..\Resources\GLSceneDWS.rc">
             <Form>GLSceneDWS.res</Form>
         </RcCompile>
@@ -131,10 +131,10 @@
                     <Source Name="MainSource">GLScene_Scripts_DT.dpk</Source>
                 </Source>
                 <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k270.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp270.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k260.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp260.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                 </Excluded_Packages>
             </Delphi.Personality>
             <Platforms>

+ 7 - 7
Packages/GLScene_Scripts_RT.dpk

@@ -36,12 +36,12 @@ requires
   DWS_RT;
 
 contains
-  Python.Script in '..\Source\Python.Script.pas',
-  DWS.Classes in '..\Source\DWS.Classes.pas',
-  DWS.HelperFunc in '..\Source\DWS.HelperFunc.pas',
-  DWS.Objects in '..\Source\DWS.Objects.pas',
-  DWS.OpenGL in '..\Source\DWS.OpenGL.pas',
-  DWS.Script in '..\Source\DWS.Script.pas',
-  DWS.VectorGeometry in '..\Source\DWS.VectorGeometry.pas';
+  GLS.PythonScript in '..\Source\GLS.PythonScript.pas',
+  GLS.dwsClasses in '..\Source\GLS.dwsClasses.pas',
+  GLS.dwsHelperFunc in '..\Source\GLS.dwsHelperFunc.pas',
+  GLS.dwsObjects in '..\Source\GLS.dwsObjects.pas',
+  GLS.dwsOpenGL in '..\Source\GLS.dwsOpenGL.pas',
+  GLS.dwsScript in '..\Source\GLS.dwsScript.pas',
+  GLS.dwsVectorGeometry in '..\Source\GLS.dwsVectorGeometry.pas';
 
 end.

+ 11 - 11
Packages/GLScene_Scripts_RT.dproj

@@ -150,13 +150,13 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
         <DCCReference Include="DWS_RT.dcp"/>
-        <DCCReference Include="..\Source\Python.Script.pas"/>
-        <DCCReference Include="..\Source\DWS.Classes.pas"/>
-        <DCCReference Include="..\Source\DWS.HelperFunc.pas"/>
-        <DCCReference Include="..\Source\DWS.Objects.pas"/>
-        <DCCReference Include="..\Source\DWS.OpenGL.pas"/>
-        <DCCReference Include="..\Source\DWS.Script.pas"/>
-        <DCCReference Include="..\Source\DWS.VectorGeometry.pas"/>
+        <DCCReference Include="..\Source\GLS.PythonScript.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsClasses.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsHelperFunc.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsObjects.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsOpenGL.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsScript.pas"/>
+        <DCCReference Include="..\Source\GLS.dwsVectorGeometry.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>
@@ -178,10 +178,10 @@
                     <Source Name="MainSource">GLScene_Scripts_RT.dpk</Source>
                 </Source>
                 <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k270.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp270.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k260.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp260.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                 </Excluded_Packages>
             </Delphi.Personality>
             <Platforms>

+ 6 - 6
Packages/GLScene_Sounds_RT.dpk

@@ -35,15 +35,15 @@ requires
   GLScene_RT;
 
 contains
-  Import.FMOD in '..\Source\Import.FMOD.pas',
-  Import.FMODpresets in '..\Source\Import.FMODpresets.pas',
-  Import.FMODtypes in '..\Source\Import.FMODtypes.pas',
-  Import.FMODerrors in '..\Source\Import.FMODerrors.pas',
-  Import.OpenAL in '..\Source\Import.OpenAL.pas',
+  Imports.FMOD in '..\Source\Imports.FMOD.pas',
+  Imports.FMODpresets in '..\Source\Imports.FMODpresets.pas',
+  Imports.FMODtypes in '..\Source\Imports.FMODtypes.pas',
+  Imports.FMODerrors in '..\Source\Imports.FMODerrors.pas',
+  Imports.OpenAL in '..\Source\Imports.OpenAL.pas',
   Sounds.BASS in '..\Source\Sounds.BASS.pas',
   Sounds.FMOD in '..\Source\Sounds.FMOD.pas',
   Sounds.OpenAL in '..\Source\Sounds.OpenAL.pas',
   Sounds.WaveOut in '..\Source\Sounds.WaveOut.pas',
-  Import.BASS in '..\Source\Import.BASS.pas';
+  Imports.BASS in '..\Source\Imports.BASS.pas';
 
 end.

+ 6 - 6
Packages/GLScene_Sounds_RT.dproj

@@ -148,16 +148,16 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="rtl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\Source\Import.FMOD.pas"/>
-        <DCCReference Include="..\Source\Import.FMODpresets.pas"/>
-        <DCCReference Include="..\Source\Import.FMODtypes.pas"/>
-        <DCCReference Include="..\Source\Import.FMODerrors.pas"/>
-        <DCCReference Include="..\Source\Import.OpenAL.pas"/>
+        <DCCReference Include="..\Source\Imports.FMOD.pas"/>
+        <DCCReference Include="..\Source\Imports.FMODpresets.pas"/>
+        <DCCReference Include="..\Source\Imports.FMODtypes.pas"/>
+        <DCCReference Include="..\Source\Imports.FMODerrors.pas"/>
+        <DCCReference Include="..\Source\Imports.OpenAL.pas"/>
         <DCCReference Include="..\Source\Sounds.BASS.pas"/>
         <DCCReference Include="..\Source\Sounds.FMOD.pas"/>
         <DCCReference Include="..\Source\Sounds.OpenAL.pas"/>
         <DCCReference Include="..\Source\Sounds.WaveOut.pas"/>
-        <DCCReference Include="..\Source\Import.BASS.pas"/>
+        <DCCReference Include="..\Source\Imports.BASS.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>

+ 0 - 1
Source/GLS.Behaviours.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.Behaviours;
 
 (* Standard TGLBehaviour subclasses *)

+ 0 - 1
Source/GLS.FileASE.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.FileASE;
 
 (*  ASE (ASCI Scene Export) file format support *)

+ 1 - 1
Source/GLS.FilePGM.pas

@@ -20,7 +20,7 @@ uses
   GLS.Strings,
   GLS.ApplicationFileIO,
 
-  Import.CUDAUtility;
+  Imports.CUDAUtility;
 
 
 type

+ 268 - 0
Source/GLS.PythonScript.pas

@@ -0,0 +1,268 @@
+//
+// The graphics rendering engine GLScene http://glscene.org
+//
+unit GLS.PythonScript;
+(*
+  Python implementation for the GLScene scripting layer.
+  This unit is experimental.
+*)
+interface
+
+uses
+  System.Classes,
+  System.SysUtils,
+
+  GLS.XCollection,
+  GLS.ScriptBase,
+  GLS.Manager,
+
+  PythonEngine;
+
+type
+  (* This class only adds manager registration logic to the TPythonEngine
+    class to enable the XCollection items (ie. TGLScriptPython) retain it's
+    assigned compiler from design to run -time. *)
+  TGLPythonEngine = class(TPythonEngine)
+  public
+    constructor Create(AOnwer: TComponent); override;
+    destructor Destroy; override;
+  end;
+
+  // Implements Python scripting functionality through the abstracted GLS.ScriptBase
+  TGLScriptPython = class(TGLScriptBase)
+  private
+    FEngine: TGLPythonEngine;
+    FEngineName: String;
+    FCompiled, FStarted: Boolean;
+  protected
+    procedure SetEngine(const Value: TGLPythonEngine);
+    procedure ReadFromFiler(reader: TReader); override;
+    procedure WriteToFiler(writer: TWriter); override;
+    procedure Loaded; override;
+    procedure Notification(AComponent: TComponent;
+      Operation: TOperation); override;
+    function GetState: TGLScriptState; override;
+  public
+    destructor Destroy; override;
+    procedure Assign(Source: TPersistent); override;
+    procedure Compile; override;
+    procedure Start; override;
+    procedure Stop; override;
+    procedure Execute; override;
+    procedure Invalidate; override;
+    function Call(aName: String; aParams: array of Variant): Variant; override;
+    class function FriendlyName: String; override;
+    class function FriendlyDescription: String; override;
+    class function ItemCategory: String; override;
+  published
+    property Engine: TGLPythonEngine read FEngine write SetEngine;
+  end;
+
+procedure Register;
+
+// --------------------------------------------------
+implementation
+
+// --------------------------------------------------
+
+
+// ----------
+// ---------- TGLPythonEngine ----------
+// ----------
+
+constructor TGLPythonEngine.Create(AOnwer: TComponent);
+begin
+  inherited;
+  RegisterManager(Self);
+end;
+
+destructor TGLPythonEngine.Destroy;
+begin
+  DeregisterManager(Self);
+  inherited;
+end;
+
+
+// ---------------
+// --------------- TGLScriptPython ---------------
+// ---------------
+
+destructor TGLScriptPython.Destroy;
+begin
+  Invalidate;
+  inherited;
+end;
+
+procedure TGLScriptPython.Assign(Source: TPersistent);
+begin
+  inherited;
+  if Source is TGLScriptPython then
+  begin
+    Engine := TGLScriptPython(Source).Engine;
+  end;
+end;
+
+procedure TGLScriptPython.ReadFromFiler(reader: TReader);
+var
+  archiveVersion: Integer;
+begin
+  inherited;
+  archiveVersion := reader.ReadInteger;
+  Assert(archiveVersion = 0);
+
+  with reader do
+  begin
+    FEngineName := ReadString;
+  end;
+end;
+
+procedure TGLScriptPython.WriteToFiler(writer: TWriter);
+begin
+  inherited;
+  writer.WriteInteger(0); // archiveVersion
+
+  with writer do
+  begin
+    if Assigned(FEngine) then
+      WriteString(FEngine.GetNamePath)
+    else
+      WriteString('');
+  end;
+end;
+
+procedure TGLScriptPython.Loaded;
+var
+  temp: TComponent;
+begin
+  inherited;
+  if FEngineName <> '' then
+  begin
+    temp := FindManager(TGLPythonEngine, FEngineName);
+    if Assigned(temp) then
+      Engine := TGLPythonEngine(temp);
+    FEngineName := '';
+  end;
+end;
+
+procedure TGLScriptPython.Notification(AComponent: TComponent;
+  Operation: TOperation);
+begin
+  if (AComponent = Engine) and (Operation = opRemove) then
+    Engine := nil;
+end;
+
+class function TGLScriptPython.FriendlyName: String;
+begin
+  Result := 'TGLScriptPython';
+end;
+
+class function TGLScriptPython.FriendlyDescription: String;
+begin
+  Result := 'Python script';
+end;
+
+class function TGLScriptPython.ItemCategory: String;
+begin
+  Result := '';
+end;
+
+procedure TGLScriptPython.Compile;
+begin
+  Invalidate;
+  if Assigned(Engine) then
+  begin
+    Engine.ExecStrings(Text);
+    FCompiled := True;
+    FStarted := False;
+  end
+  else
+    raise Exception.Create('No engine assigned!');
+end;
+
+procedure TGLScriptPython.Execute;
+begin
+  Compile;
+end;
+
+procedure TGLScriptPython.Invalidate;
+begin
+  FStarted := False;
+  FCompiled := False;
+end;
+
+procedure TGLScriptPython.Start;
+begin
+  Compile;
+  FStarted := True;
+end;
+
+procedure TGLScriptPython.Stop;
+begin
+  FStarted := False;
+end;
+
+function TGLScriptPython.Call(aName: String; aParams: array of Variant)
+  : Variant;
+var
+  func: PPyObject;
+  args: array of TVarRec;
+  i: Integer;
+begin
+  if State = ssUncompiled then
+    Start;
+  if State = ssRunning then
+  begin
+    func := Engine.FindFunction('__main__', aName);
+    if Assigned(func) then
+      if Length(aParams) > 0 then
+      begin
+        SetLength(args, Length(aParams));
+        for i := 0 to Length(aParams) - 1 do
+        begin
+          args[i].VType := vtVariant;
+          args[i].VVariant := @aParams[i];
+        end;
+        Result := Engine.EvalFunction(func, args);
+      end
+      else
+        Result := Engine.EvalFunctionNoArgs(func);
+  end;
+end;
+
+procedure TGLScriptPython.SetEngine(const Value: TGLPythonEngine);
+begin
+  if Value <> FEngine then
+  begin
+    FEngine := Value;
+    Invalidate;
+  end;
+end;
+
+function TGLScriptPython.GetState: TGLScriptState;
+begin
+  Result := ssUncompiled;
+  if Assigned(Engine) and FCompiled and FStarted then
+    Result := ssRunning;
+end;
+
+procedure Register;
+begin
+  RegisterClasses([TGLPythonEngine, TGLScriptPython]);
+  RegisterComponents('GLScene Python', [TGLPythonEngine]);
+end;
+
+// --------------------------------------------------
+initialization
+
+// --------------------------------------------------
+
+RegisterXCollectionItemClass(TGLScriptPython);
+
+// --------------------------------------------------
+finalization
+
+// --------------------------------------------------
+
+UnregisterXCollectionItemClass(TGLScriptPython);
+
+end.

+ 5 - 6
Source/SDL2.Frame.pas → Source/GLS.SDL2Frame.pas

@@ -6,18 +6,20 @@
   ==                                                                            ==
   ================================================================================
 *)
-unit SDL2.Frame;
+unit GLS.SDL2Frame;
 
 interface
 
 uses
   Winapi.Windows,
-  Vcl.Dialogs,
   System.SysUtils,
   System.Classes,
+  Vcl.Dialogs,
   Vcl.Controls,
   Vcl.ExtCtrls,
-  Import.SDL2;
+  Vcl.Forms,
+
+  Imports.SDL2;
 
 type
   TSDL2Frame = class(TPanel)
@@ -42,9 +44,6 @@ implementation
 
 // ------------------------------------
 
-uses
-  forms;
-
 // ******************************************************************************
 
 procedure Register;

+ 2 - 3
Source/GLS.SDLContext.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.SDLContext;
 
 (*
@@ -26,8 +25,8 @@ uses
   GLS.Context,
   GLS.Scene,
 
-  SDL.Window,
-  Import.SDL2;
+  Imports.SDL2,
+  GLS.SDLWindow;
 
 type
   (* A viewer using SDL.

+ 1 - 2
Source/GLS.SDLWindow.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.SDLWindow;
 
 (*
@@ -28,7 +27,7 @@ uses
   GLS.State,
   GLS.Context,
   GLS.VectorGeometry,
-  Import.SDL2;
+  Imports.SDL2;
 
 type
   (* Pixel Depth options.

+ 1 - 2
Source/DWS.Classes.pas → Source/GLS.dwsClasses.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.Classes;
+unit GLS.dwsClasses;
 
 (* DelphiWebScript symbol creation for base Delphi classes. *)
 

+ 1 - 2
Source/DWS.HelperFunc.pas → Source/GLS.dwsHelperFunc.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.HelperFunc;
+unit GLS.dwsHelperFunc;
 
 (*
   Helper functions for creating class, properties and

+ 2 - 5
Source/DWS.Objects.pas → Source/GLS.dwsObjects.pas

@@ -1,14 +1,11 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.Objects;
-
+unit GLS.dwsObjects;
 (*
   Base classes and logic for DelphiWebScript enabled
   objects in GLScene
 *)
-
 interface
 
 uses
@@ -21,7 +18,7 @@ uses
   GLS.BaseClasses,
   GLS.Manager,
 
-  DWS.Script,
+  GLS.dwsScript,
   dwsComp,
   dwsExprs,
   dwsSymbols;

+ 1 - 4
Source/DWS.OpenGL.pas → Source/GLS.dwsOpenGL.pas

@@ -1,14 +1,11 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.OpenGL;
-
+unit GLS.dwsOpenGL;
 (*
    DelphiWebScript symbol creation for OpenGL procedures and functions.
    This unit is still under development.
 *)
-
 interface
 
 {$I GLScene.inc}

+ 2 - 3
Source/DWS.Scene.pas → Source/GLS.dwsScene.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.Scene;
+unit GLS.dwsScene;
 
 (*
   DelphiWebScript symbol creation for base GLScene classes.
@@ -22,7 +21,7 @@ uses
   GLS.VectorGeometry,
   GLS.Coordinates,
 
-  DWS.HelperFunc,
+  GLS.dwsHelperFunc,
   dwsExprs,
   dwsSymbols,
   dwsComp,

+ 1 - 2
Source/DWS.Script.pas → Source/GLS.dwsScript.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.Script;
+unit GLS.dwsScript;
 
 (* DelphiWebScript implementation for the GLScene scripting layer *)
 

+ 2 - 3
Source/DWS.VectorGeometry.pas → Source/GLS.dwsVectorGeometry.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit DWS.VectorGeometry;
+unit GLS.dwsVectorGeometry;
 
 (* DelphiWebScript symbol creation for GLS.VectorGeometry types and functions *)
 
@@ -11,7 +10,7 @@ interface
 uses
   System.Classes,
   dwsExprs,
-  DdwsSymbols,
+  dwsSymbols,
   dwsComp,
   dwsFunctions,
   GLS.VectorGeometry;

+ 1 - 2
Source/GLSL.CgBombShader.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLSL.CgBombShader;
 
 (*  Just a good looking shader *)
@@ -22,7 +21,7 @@ uses
   GLS.RenderContextInfo,
   GLS.TextureFormat,
 
-  Import.cgGL,
+  Imports.cgGL,
   GLSL.CgShader;
 
 type

+ 2 - 3
Source/GLSL.CgPostTransformationShader.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLSL.CgPostTransformationShader;
 
 (*
@@ -25,8 +24,8 @@ uses
   GLS.RenderContextInfo,
   GLS.TextureFormat,
 
-  Import.Cg,
-  Import.CgGL,
+  Imports.Cg,
+  Imports.CgGL,
   GLSL.CustomShader,
   GLSL.CgShader;
 

+ 2 - 3
Source/GLSL.CgRegister.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLSL.CgRegister;
 
 (*  Registration unit for Cg shader package *)
@@ -18,8 +17,8 @@ uses
 
   GLS.Material,
 
-  Import.Cg,
-  Import.CgGL,
+  Imports.Cg,
+  Imports.CgGL,
   GLS.SceneRegister,  //?
   GLSL.CgShader,
   GLSL.CgBombShader;

+ 2 - 3
Source/GLSL.CgShader.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLSL.CgShader;
 
 (* Base Cg shader classes *)
@@ -26,8 +25,8 @@ uses
   GLS.Material,
   GLS.TextureFormat,
 
-  Import.cg,
-  Import.cgGL;
+  Imports.cg,
+  Imports.cgGL;
 
 {$I GLScene.inc}
 

+ 2 - 2
Source/GPU.CUDA.pas

@@ -25,8 +25,8 @@ uses
   GLS.Strings,
   GLS.Utils,
 
-  Import.CUDAApi,
-  Import.CUDARunTime,
+  Imports.CUDAApi,
+  GPU.CUDARunTime,
   GPU.CUDAParser,
   GPU.CUDAFourierTransform,
   GPU.CUDACompiler,

+ 2 - 2
Source/GPU.CUDAContext.pas

@@ -15,8 +15,8 @@ uses
   GLS.Context,
   GLS.Generics,
 
-  Import.CUDAApi,
-  Import.CUDARunTime;
+  Imports.CUDAApi,
+  GPU.CUDARunTime;
 
 type
 

+ 1 - 1
Source/GPU.CUDAFFTPlan.pas

@@ -13,7 +13,7 @@ uses
   System.Classes,
   System.SysUtils,
 
-  Import.CUDAApi,
+  Imports.CUDAApi,
   GPU.CUDAContext,
   GPU.CUDA,
   GPU.CUDAFourierTransform,

+ 2 - 2
Source/GPU.CUDAFourierTransform.pas

@@ -48,8 +48,8 @@ uses
   GLS.VectorTypes,
   GLS.Strings,
 
-  Import.CUDAApi,
-  Import.CUDARunTime;
+  Imports.CUDAApi,
+  GPU.CUDARunTime;
 
 
 const

+ 1 - 1
Source/GPU.CUDAGraphics.pas

@@ -16,7 +16,7 @@ uses
   System.Classes,
   System.SysUtils,
 
-  Import.CUDAApi,
+  Imports.CUDAApi,
   GPU.CUDA,
 
   GLS.Context,

+ 1 - 1
Source/GPU.CUDAParser.pas

@@ -13,7 +13,7 @@ interface
 uses
   System.Classes,
   System.SysUtils,
-  Import.CUDARunTime;
+  GPU.CUDARunTime;
 
 type
 

+ 1 - 1
Source/GPU.CUDAPropEditors.pas

@@ -66,7 +66,7 @@ implementation
 //-----------------------------------------------
 
 uses
-  Import.CUDARunTime;
+  GPU.CUDARunTime;
 
 function FindCuFile(var AModuleName: string): Boolean;
 var

+ 1 - 1
Source/GPU.CUDARuntime.pas

@@ -47,7 +47,7 @@ interface
 uses
   Winapi.Windows,
 
-  Import.CUDAApi,
+  Imports.CUDAApi,
   GLS.Logger;
 
 const

+ 0 - 695
Source/Import.CUDARuntime.pas

@@ -1,695 +0,0 @@
-//
-// The graphics rendering engine GLScene http://glscene.org
-//
-
-unit Import.CUDARuntime;
-
-(* GLScene CUDA Runtime *)
-
-(*
- * Copyright 1993-2020 NVIDIA Corporation.  All rights reserved.
- *
- * NOTICE TO USER:
- *
- * This source code is subject to NVIDIA ownership rights under U.S. and
- * international Copyright laws.  Users and possessors of this source code
- * are hereby granted a nonexclusive, royalty-free license to use this code
- * in individual and commercial software.
- *
- * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
- * CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
- * IMPLIED WARRANTY OF ANY KIND.  NVIDIA DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
- * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS,  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION,  ARISING OUT OF OR IN CONNECTION WITH THE USE
- * OR PERFORMANCE OF THIS SOURCE CODE.
- *
- * U.S. Government End Users.   This source code is a "commercial item" as
- * that term is defined at  48 C.F.R. 2.101 (OCT 1995), consisting  of
- * "commercial computer  software"  and "commercial computer software
- * documentation" as such terms are  used in 48 C.F.R. 12.212 (SEPT 1995)
- * and is provided to the U.S. Government only as a commercial end item.
- * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
- * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
- * source code with only those rights set forth herein.
- *
- * Any use of this source code in individual and commercial software must
- * include, in the user documentation and internal comments to the code,
- * the above Disclaimer and U.S. Government End Users Notice.
- *)
-
-interface
-
-{$I GLScene.inc}
-
-uses
-  Winapi.Windows,
-  Import.CUDAApi;
-
-const
-{$IFDEF WIN32}
-  CUDARTDLLNAMES: array [0 .. 9] of string = (
-    'cudart32_42_9', 'cudart32_41_28',
-    'cudart32_40_10', 'cudart32_32_16', 'cudart32_31_4',
-    'cudart32_30_14', 'cudart32_30_9', 'cudart32_30_8', 'cudart32', 'cudart');
-{$ENDIF}
-
-{$IFDEF WIN64}
-  CUDARTDLLNAMES: array [0 .. 7] of string = (
-    'cudart64_42_9', 'cudart64_41_28',
-    'cudart64_40_10', 'cudart64_32_16', 'cudart64_31_4',
-    'cudart64_30_14', 'cudart64_30_9', 'cudart64_30_8');
-{$ENDIF}
-
-const
-  // single precision constants
-  CUDART_INF_F: Single = $7F800000;
-  CUDART_NAN_F: Single = $7FFFFFFF;
-  CUDART_MIN_DENORM_F: Single = $00000001;
-  CUDART_MAX_NORMAL_F: Single = $7F7FFFFF;
-  CUDART_NEG_ZERO_F: Single = $80000000;
-  CUDART_ZERO_F = 0.0;
-  CUDART_ONE_F = 1.0;
-  CUDART_SQRT_HALF_F = 0.707106781;
-  CUDART_SQRT_TWO_F = 1.414213562;
-  CUDART_THIRD_F = 0.333333333;
-  CUDART_PIO4_F = 0.785398163;
-  CUDART_PIO2_F = 1.570796327;
-  CUDART_3PIO4_F = 2.356194490;
-  CUDART_2_OVER_PI_F = 0.636619772;
-  CUDART_PI_F = 3.141592654;
-  CUDART_L2E_F = 1.442695041;
-  CUDART_L2T_F = 3.321928094;
-  CUDART_LG2_F = 0.301029996;
-  CUDART_LGE_F = 0.434294482;
-  CUDART_LN2_F = 0.693147181;
-  CUDART_LNT_F = 2.302585093;
-  CUDART_LNPI_F = 1.144729886;
-  CUDART_TWO_TO_M126_F = 1.175494351E-38;
-  CUDART_TWO_TO_126_F = 8.507059173E37;
-  CUDART_NORM_HUGE_F = 3.402823466E38;
-  CUDART_TWO_TO_23_F = 8388608.0;
-  CUDART_TWO_TO_24_F = 16777216.0;
-  CUDART_TWO_TO_31_F = 2147483648.0;
-  CUDART_TWO_TO_32_F = 4294967296.0;
-  CUDART_REMQUO_BITS_F = 3;
-  CUDART_REMQUO_MASK_F = CUDART_REMQUO_BITS_F;
-  CUDART_TRIG_PLOSS_F = 48039.0;
-
-  // double precision constants */
-{$IFNDEF CUDA_NO_SM_13_DOUBLE_INTRINSICS}
-  CUDART_INF: Double = $7FF0000000000000;
-  CUDART_NAN: Double = $FFF8000000000000;
-  CUDART_NEG_ZERO: Double = $8000000000000000;
-  CUDART_MIN_DENORM: Double = $0000000000000001;
-{$ELSE} // not CUDA_NO_SM_13_DOUBLE_INTRINSICS
-  CUDART_INF: Double = $7FF0000000000000;
-  CUDART_NAN: Double = $FFF8000000000000;
-  CUDART_NEG_ZERO: Double = $8000000000000000;
-  CUDART_MIN_DENORM: Double = $0000000000000001;
-{$ENDIF}
-  CUDART_ZERO = 0.0;
-  CUDART_ONE = 1.0;
-  CUDART_SQRT_TWO = 1.4142135623730951E+0;
-  CUDART_SQRT_HALF = 7.0710678118654757E-1;
-  CUDART_THIRD = 3.3333333333333333E-1;
-  CUDART_TWOTHIRD = 6.6666666666666667E-1;
-  CUDART_PIO4 = 7.8539816339744828E-1;
-  CUDART_PIO4_HI = 7.8539816339744828E-1;
-  CUDART_PIO4_LO = 3.0616169978683830E-17;
-  CUDART_PIO2 = 1.5707963267948966E+0;
-  CUDART_PIO2_HI = 1.5707963267948966E+0;
-  CUDART_PIO2_LO = 6.1232339957367660E-17;
-  CUDART_3PIO4 = 2.3561944901923448E+0;
-  CUDART_2_OVER_PI = 6.3661977236758138E-1;
-  CUDART_PI = 3.1415926535897931E+0;
-  CUDART_PI_HI = 3.1415926535897931E+0;
-  CUDART_PI_LO = 1.2246467991473532E-16;
-  CUDART_SQRT_2PI_HI = 2.5066282746310007E+0;
-  CUDART_SQRT_2PI_LO = -1.8328579980459167E-16;
-  CUDART_SQRT_PIO2_HI = 1.2533141373155003E+0;
-  CUDART_SQRT_PIO2_LO = -9.1642899902295834E-17;
-  CUDART_L2E = 1.4426950408889634E+0;
-  CUDART_L2E_HI = 1.4426950408889634E+0;
-  CUDART_L2E_LO = 2.0355273740931033E-17;
-  CUDART_L2T = 3.3219280948873622E+0;
-  CUDART_LG2 = 3.0102999566398120E-1;
-  CUDART_LG2_HI = 3.0102999566398120E-1;
-  CUDART_LG2_LO = -2.8037281277851704E-18;
-  CUDART_LGE = 4.3429448190325182E-1;
-  CUDART_LGE_HI = 4.3429448190325182E-1;
-  CUDART_LGE_LO = 1.09831965021676510E-17;
-  CUDART_LN2 = 6.9314718055994529E-1;
-  CUDART_LN2_HI = 6.9314718055994529E-1;
-  CUDART_LN2_LO = 2.3190468138462996E-17;
-  CUDART_LNT = 2.3025850929940459E+0;
-  CUDART_LNT_HI = 2.3025850929940459E+0;
-  CUDART_LNT_LO = -2.1707562233822494E-16;
-  CUDART_LNPI = 1.1447298858494002E+0;
-  CUDART_LN2_X_1024 = 7.0978271289338397E+2;
-  CUDART_LN2_X_1025 = 7.1047586007394398E+2;
-  CUDART_LN2_X_1075 = 7.4513321910194122E+2;
-  CUDART_LG2_X_1024 = 3.0825471555991675E+2;
-  CUDART_LG2_X_1075 = 3.2360724533877976E+2;
-  CUDART_TWO_TO_23 = 8388608.0;
-  CUDART_TWO_TO_52 = 4503599627370496.0;
-  CUDART_TWO_TO_54 = 18014398509481984.0;
-  CUDART_TWO_TO_M54 = 5.5511151231257827E-17;
-  CUDART_TWO_TO_M1022 = 2.22507385850720140E-308;
-  CUDART_TRIG_PLOSS = 2147483648.0;
-
-type
-  TcudaError = (cudaSuccess, cudaErrorMissingConfiguration,
-    cudaErrorMemoryAllocation, cudaErrorInitializationError,
-    cudaErrorLaunchFailure, cudaErrorPriorLaunchFailure, cudaErrorLaunchTimeout,
-    cudaErrorLaunchOutOfResources, cudaErrorInvalidDeviceFunction,
-    cudaErrorInvalidConfiguration, cudaErrorInvalidDevice,
-    cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidSymbol,
-    cudaErrorMapBufferObjectFailed, cudaErrorUnmapBufferObjectFailed,
-    cudaErrorInvalidHostPointer, cudaErrorInvalidDevicePointer,
-    cudaErrorInvalidTexture, cudaErrorInvalidTextureBinding,
-    cudaErrorInvalidChannelDescriptor, cudaErrorInvalidMemcpyDirection,
-    cudaErrorAddressOfConstant, cudaErrorTextureFetchFailed,
-    cudaErrorTextureNotBound, cudaErrorSynchronizationError,
-    cudaErrorInvalidFilterSetting, cudaErrorInvalidNormSetting,
-    cudaErrorMixedDeviceExecution, cudaErrorCudartUnloading, cudaErrorUnknown,
-    cudaErrorNotYetImplemented, cudaErrorMemoryValueTooLarge,
-    cudaErrorInvalidResourceHandle, cudaErrorNotReady, cudaErrorStartupFailure,
-    cudaErrorApiFailureBase);
-
-  { +//DEVICE_BUILTIN*/ }
-  TCudaChannelFormatKind = (cudaChannelFormatKindSigned,
-    cudaChannelFormatKindUnsigned, cudaChannelFormatKindFloat);
-
-  TCudaGLMapFlags = (cudaGLMapFlagsNone,
-    /// < Default; Assume resource can be read/written
-    cudaGLMapFlagsReadOnly,
-    /// < CUDA kernels will not write to this resource
-    cudaGLMapFlagsWriteDiscard);
-  /// < CUDA kernels will only write to and will not read from this resource
-
-  { +//DEVICE_BUILTIN*/ }
-  PcudaChannelFormatDesc = ^TCudaChannelFormatDesc;
-
-  TCudaChannelFormatDesc = record
-    x: Integer;
-    y: Integer;
-    z: Integer;
-    w: Integer;
-    f: TCudaChannelFormatKind;
-  end;
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaArray = record
-  end; // !ATTENTION foreward Declaration?)
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaMemcpyKind = (cudaMemcpyHostToHost { = 0 } , cudaMemcpyHostToDevice,
-    cudaMemcpyDeviceToHost, cudaMemcpyDeviceToDevice);
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaPitchedPtr = record
-    ptr: Pointer;
-    pitch: NativeUInt;
-    xsize: NativeUInt;
-    ysize: NativeUInt;
-  end;
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaExtent = record
-    width: NativeUInt;
-    height: NativeUInt;
-    depth: NativeUInt;
-  end;
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaPos = record
-    x: NativeUInt;
-    y: NativeUInt;
-    z: NativeUInt;
-  end;
-
-  { +//DEVICE_BUILTIN*/ }
-  TcudaMemcpy3DParms = record
-    srcArray: Pointer;
-    srcPos: TcudaPos;
-    srcPtr: TcudaPitchedPtr;
-    dstArray: Pointer;
-    dstPos: TcudaPos;
-    dstPtr: TcudaPitchedPtr;
-    extent: TcudaExtent;
-    kind: TcudaMemcpyKind;
-  end;
-
-  { +//DEVICE_BUILTIN*/ }
-  PCudaDeviceProp = ^TCudaDeviceProp;
-
-  TCudaDeviceProp = record
-    name: array [0 .. 256 - 1] of AnsiChar;
-    totalGlobalMem: NativeUInt;
-    sharedMemPerBlock: NativeUInt;
-    regsPerBlock: Integer;
-    warpSize: Integer;
-    memPitch: NativeUInt;
-    maxThreadsPerBlock: Integer;
-    maxThreadsDim: array [0 .. 3 - 1] of Integer;
-    maxGridSize: array [0 .. 3 - 1] of Integer;
-    clockRate: Integer;
-    totalConstMem: NativeUInt;
-    major: Integer;
-    minor: Integer;
-    textureAlignment: NativeUInt;
-    deviceOverlap: Integer;
-    multiProcessorCount: Integer;
-    // Specified whether there is a run time limit on kernels
-    kernelExecTimeoutEnabled: Integer;
-    // Device is egrated as opposed to discrete
-    egrated: Integer;
-    // Device can map host memory with cudaHostAlloc/cudaHostGetDevicePoer
-    canMapHostMemory: Integer;
-    // Compute mode (See ::cudaComputeMode)
-    computeMode: Integer;
-    // Maximum 1D texture size
-    maxTexture1D: Integer;
-    // Maximum 2D texture dimensions
-    maxTexture2D: array[0..1] of Integer;
-    // Maximum 3D texture dimensions
-    maxTexture3D: array[0..2] of Integer;
-    // Maximum 2D texture array dimensions
-    maxTexture2DArray: array[0..2] of Integer;
-    // Alignment requirements for surfaces
-    surfaceAlignment: NativeUInt;
-     // Device can possibly execute multiple kernels concurrently
-    concurrentKernels: Integer;
-    // Device has ECC support enabled
-    ECCEnabled: Integer;
-    // PCI bus ID of the device
-    pciBusID: Integer;
-    // PCI device ID of the device
-    pciDeviceID: Integer;
-    // 1 if device is a Tesla device using TCC driver, 0 otherwise
-    tccDriver: Integer;
-    __cudaReserved: array [0 .. 20] of Integer;
-  end;
-
-  TcudaTextureAddressMode = (cudaAddressModeWrap, cudaAddressModeClamp, cudaAddressModeMirror);
-
-  TcudaTextureFilterMode = (cudaFilterModePoint, cudaFilterModeLinear);
-
-  TcudaTextureReadMode = (cudaReadModeElementType, cudaReadModeNormalizedFloat);
-
-  PTextureReference = ^TTextureReference;
-
-  TTextureReference = record
-    normalized: Integer;
-    filterMode: TcudaTextureFilterMode;
-    addressMode: array [0 .. 2] of TcudaTextureAddressMode;
-    channelDesc: TCudaChannelFormatDesc;
-    __cudaReserved: array [0 .. 15] of Integer;
-  end;
-
-  PcudaArray = ^TcudaArray;
-
-  { +//****************************************************************************** }
-  { -** }
-  { -* SHORTHAND TYPE DEFINITION USED BY RUNTIME API* }
-  { -** }
-  { =*******************************************************************************/ }
-
-  { +//DEVICE_BUILTIN*/ }
-  cudaError_t = TcudaError;
-  { +//DEVICE_BUILTIN*/ }
-  cudaStream_t = Integer;
-  { +//DEVICE_BUILTIN*/ }
-  cudaEvent_t = Integer;
-
-(*******************************************************************************)
-
-var
-
-cudaBindTexture: function(var offset: NativeUInt; const texref: PTextureReference;
-    var devPtr: Pointer; var desc: TCudaChannelFormatDesc; size: NativeUInt): cudaError_t;stdcall;
-cudaBindTexture2D: function(var offset: NativeUInt; const texref: PTextureReference; const devPtr: Pointer;
-    var desc: TCudaChannelFormatDesc; width, height, pitch: NativeUInt): cudaError_t;stdcall;
-cudaBindTextureToArray: function(const texref: PTextureReference; const cudaArray: PcudaArray): cudaError_t;stdcall;
-cudaUnbindTexture: function(const texref: PTextureReference): cudaError_t;stdcall;
-cudaGetTextureAlignmentOffset: function(offset: NativeUInt; const texref: PTextureReference): cudaError_t;stdcall;
-cudaGetTextureReference: function(const texref: PTextureReference; const symbol: PAnsiChar): cudaError_t;stdcall;
-cudaGetChannelDesc: function(var desc: TCudaChannelFormatDesc; const array_: Pointer): cudaError_t;stdcall;
-cudaCreateChannelDesc: function(x, y, z, w: Integer; f: TCudaChannelFormatKind): TCudaChannelFormatDesc;stdcall;
-(* ******************************************************************************
-  *                                                                              *
-  *                                                                              *
-  *                                                                              *
-  ****************************************************************************** *)
-
-cudaMalloc3D: function(var pitchedDevPtr: TcudaPitchedPtr; extent: TcudaExtent): cudaError_t;stdcall;
-cudaMalloc3DArray: function(var arrayPtr: PcudaArray; const desc: TCudaChannelFormatDesc;
-  extent: TcudaExtent; flags: Cardinal): cudaError_t;stdcall;
-cudaMemset3D: function(pitchedDevPtr: TcudaPitchedPtr; value: Integer; extent: TcudaExtent): cudaError_t;stdcall;
-cudaMemcpy3D: function(const p: TcudaMemcpy3DParms): cudaError_t;stdcall;
-cudaMemcpy3DAsync: function(const p: TcudaMemcpy3DParms; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMalloc: function(var devPtr; size: NativeUInt): cudaError_t;stdcall;
-cudaMallocHost: function(var ptr: Pointer; size: NativeUInt): cudaError_t;stdcall;
-cudaMallocPitch: function(var devPtr; var pitch: NativeUInt; width: NativeUInt; height: NativeUInt): cudaError_t;stdcall;
-cudaMallocArray: function(var aarray: Pointer; var desc: TCudaChannelFormatDesc; width: NativeUInt; height: NativeUInt): cudaError_t;stdcall;
-cudaFree: function(devPtr: Pointer): cudaError_t;stdcall;
-cudaFreeHost: function(ptr: Pointer): cudaError_t;stdcall;
-cudaFreeArray: function(const aarray: Pointer): cudaError_t;stdcall;
-cudaHostAlloc: function(var pHost: Pointer; bytes: NativeUInt; flags: Cardinal): cudaError_t;stdcall;
-cudaHostGetDevicePointer: function(var pDevice: Pointer; pHost: Pointer; flags: Cardinal): cudaError_t;stdcall;
-cudaHostGetFlags: function(var pFlags: Cardinal; pHost: Pointer): cudaError_t;stdcall;
-cudaMemGetInfo: function(var free: NativeUInt; var total: NativeUInt): cudaError_t;stdcall;
-cudaMemcpy: function(dst: Pointer; src: Pointer;
-  count: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpyToArray: function(var dst: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt; var src;
-  count: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpyFromArray: function(var dst; const src: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt;
-  count: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpyArrayToArray: function(dst: PcudaArray; wOffsetDst: NativeUInt; hOffsetDst: NativeUInt; const src: PcudaArray; wOffsetSrc: NativeUInt;
-  hOffsetSrc: NativeUInt; count: NativeUInt; const kind: TcudaMemcpyKind = cudaMemcpyDeviceToDevice): cudaError_t;stdcall;
-cudaMemcpy2D: function(var dst; dpitch: NativeUInt; var src; spitch: NativeUInt;
-  width: NativeUInt; height: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpy2DToArray: function(dst: PcudaArray; wOffset: NativeUInt;
-  hOffset: NativeUInt; var src; spitch: NativeUInt; width: NativeUInt; height: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpy2DFromArray: function(var dst; dpitch: NativeUInt; src: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt; width: NativeUInt; height: NativeUInt;
-  kind: TcudaMemcpyKind): cudaError_t;stdcall;
-cudaMemcpy2DArrayToArray: function(dst: PcudaArray; wOffsetDst: NativeUInt;
-  hOffsetDst: NativeUInt; src: PcudaArray; wOffsetSrc: NativeUInt; hOffsetSrc: NativeUInt;
-  width: NativeUInt; height: NativeUInt; const kind: TcudaMemcpyKind = cudaMemcpyDeviceToDevice): cudaError_t;stdcall;
-cudaMemcpyToSymbol: function(symbol: PAnsiChar; var src; count: NativeUInt; const offset: NativeUInt = 0;
-  const kind: TcudaMemcpyKind = cudaMemcpyHostToDevice): cudaError_t;stdcall;
-cudaMemcpyFromSymbol: function(var dst; symbol: PAnsiChar; count: NativeUInt; const offset: NativeUInt = 0;
-  const kind: TcudaMemcpyKind = cudaMemcpyDeviceToHost): cudaError_t;stdcall;
-
-{ +//*************************************************************************** }
-{ -** }
-{ -** }
-{ -** }
-{ =***************************************************************************** }
-
-cudaMemcpyAsync: function(var dst; const src; count: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpyToArrayAsync: function(dst: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt; const src; count: NativeUInt; kind: TcudaMemcpyKind;
-  stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpyFromArrayAsync: function(var dst; const src: PcudaArray;
-  wOffset: NativeUInt; hOffset: NativeUInt; count: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpy2DAsync: function(var dst; dpitch: NativeUInt; const src;
-  spitch: NativeUInt; width: NativeUInt; height: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpy2DToArrayAsync: function(dst: PcudaArray; wOffset: NativeUInt;
-  hOffset: NativeUInt; const src; spitch: NativeUInt; width: NativeUInt; height: NativeUInt;
-  kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpy2DFromArrayAsync: function(var dst; dpitch: NativeUInt;
-  const src: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt; width: NativeUInt;
-  height: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpyToSymbolAsync: function(const symbol: PAnsiChar; const src;
-  count: NativeUInt; offset: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-cudaMemcpyFromSymbolAsync: function(var dst; const symbol: PAnsiChar;
-  count: NativeUInt; offset: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;stdcall;
-
-(******************************************************************************
- *                                                                            *
- *                                                                            *
- *                                                                            *
- *****************************************************************************)
-
-cudaMemset: function(var devPtr; value: Integer; count: NativeUInt): cudaError_t;stdcall;
-cudaMemset2D: function(var devPtr; pitch: NativeUInt; value: Integer;
-  width: NativeUInt; height: NativeUInt): cudaError_t;stdcall;
-(*****************************************************************************
- *                                                                           *
- *                                                                           *
- *                                                                           *
- *****************************************************************************)
-
-cudaGetSymbolAddress: function(var devPtr: Pointer; const symbol: PAnsiChar): cudaError_t;stdcall;
-cudaGetSymbolSize: function(var size: NativeUInt; const symbol: PAnsiChar): cudaError_t;stdcall;
-
-{ +//*************************************************************************** }
-{ -** }
-{ -** }
-{ -** }
-{ =***************************************************************************** }
-
-cudaGetDeviceCount: function(var count: Integer): cudaError_t;stdcall;
-cudaGetDeviceProperties: function(var prop: TCudaDeviceProp; device: Integer): cudaError_t;stdcall;
-cudaChooseDevice: function(var device: Integer; const prop: PCudaDeviceProp): cudaError_t;stdcall;
-cudaSetDevice: function(device: Integer): cudaError_t;stdcall;
-cudaGetDevice: function(var device: Integer): cudaError_t;stdcall;
-cudaSetDeviceFlags: function(flags: Integer): cudaError_t;stdcall;
-cudaSetValidDevices: function(device_arr: PInteger; len: Integer): cudaError_t;stdcall;
-(******************************************************************************
- *
- *
- *
- *****************************************************************************)
-
-cudaConfigureCall: function(gridDim, blockDim: TDim3; sharedMem: NativeUInt; stream: cudaStream_t): cudaError_t;stdcall;
-cudaSetupArgument: function(const arg: Pointer; size: NativeUInt; offset: NativeUInt): cudaError_t;stdcall;
-cudaFuncSetCacheConfig: function(const func: PAnsiChar; cacheConfig: TcudaFuncCache): cudaError_t;stdcall;
-cudaLaunch: function(const entry: PAnsiChar): cudaError_t;stdcall;
-cudaFuncGetAttributes: function(var attr: TcudaFuncAttributes; const func: PAnsiChar): cudaError_t;stdcall;
-  { +//****************************************************************************** }
-  { -** }
-  { -** }
-  { -** }
-  { =*******************************************************************************/ }
-
-cudaGetLastError: function: cudaError_t;stdcall;
-  { +//****************************************************************************** }
-  { -** }
-  { -** }
-  { -** }
-  { =*******************************************************************************/ }
-cudaGLSetGLDevice: function(device: Integer): cudaError_t;stdcall;
-cudaGLRegisterBufferObject: function(bufObj: Cardinal): cudaError_t;stdcall;
-cudaGraphicsGLRegisterImage: function(const resource: PCUgraphicsResource; image: Cardinal; target: Cardinal; flags: Cardinal): cudaError_t;stdcall;
-cudaGraphicsGLRegisterBuffer: function(const resource: PCUgraphicsResource; buffer: Cardinal; flags: Cardinal): cudaError_t;stdcall;
-cudaGLMapBufferObject: function(devPtr: Pointer; bufObj: Cardinal): cudaError_t;stdcall;
-cudaGLUnmapBufferObject: function(bufObj: Cardinal): cudaError_t;stdcall;
-cudaGLUnregisterBufferObject: function(bufObj: Cardinal): cudaError_t;stdcall;
-cudaGLSetBufferObjectMapFlags: function(bufObj: Cardinal; flags: TCudaGLMapFlags): cudaError_t;stdcall;
-cudaGLMapBufferObjectAsync: function(var devPtr: Pointer; bufObj: Cardinal; stream: cudaStream_t): cudaError_t;stdcall;
-cudaGLUnmapBufferObjectAsync: function(bufObj: Cardinal; stream: cudaStream_t): cudaError_t;stdcall;
-cudaGraphicsUnregisterResource: function(resource: PCUgraphicsResource): cudaError_t;stdcall;
-cudaGraphicsResourceSetMapFlags: function(resource: PCUgraphicsResource; flags: Cardinal): cudaError_t;stdcall;
-cudaGraphicsMapResources: function(count: Integer; const resources: PCUgraphicsResource; stream: cudaStream_t): cudaError_t;stdcall;
-cudaGraphicsUnmapResources: function(count: Integer; const resources: PCUgraphicsResource; stream: cudaStream_t): cudaError_t;stdcall;
-cudaGraphicsResourceGetMappedPointer: function(var pDevPtr: TCUdeviceptr;
-  var pSize: Cardinal; resource: PCUgraphicsResource): cudaError_t;stdcall;
-cudaGraphicsSubResourceGetMappedArray: function(var pArray: PCUarray;
-  resource: PCUgraphicsResource; arrayIndex: Cardinal; mipLevel: Cardinal): cudaError_t;stdcall;
-cudaGetErrorString: function(error: cudaError_t): PAnsiChar;stdcall;
-cudaDriverGetVersion: function(out driverVersion: Integer): cudaError_t;stdcall;
-cudaRuntimeGetVersion: function(out runtimeVersion: Integer): cudaError_t;stdcall;
-(* ******************************************************************************
- *                                                                              *
- *                                                                              *
- *                                                                              *
- ****************************************************************************** *)
-
-cudaSetDoubleForDevice: function(var d: Double): cudaError_t;stdcall;
-cudaSetDoubleForHost: function(var d: Double): cudaError_t;stdcall;
-(* ******************************************************************************
- *                                                                              *
- *                                                                              *
- *                                                                              *
- ****************************************************************************** *)
-
-cudaStreamCreate: function(var pStream: cudaStream_t): cudaError_t;stdcall;
-cudaStreamDestroy: function(stream: cudaStream_t): cudaError_t;stdcall;
-cudaStreamSynchronize: function(stream: cudaStream_t): cudaError_t;stdcall;
-cudaStreamQuery: function(stream: cudaStream_t): cudaError_t;stdcall;
-(* ******************************************************************************
- *                                                                              *
- *                                                                              *
- *                                                                              *
- ****************************************************************************** *)
-
-cudaEventCreate: function(var event: cudaEvent_t): cudaError_t;stdcall;
-cudaEventCreateWithFlags: function(var event: cudaEvent_t; flags: Integer): cudaError_t;stdcall;
-cudaEventRecord: function(event: cudaEvent_t; stream: cudaStream_t): cudaError_t;stdcall;
-cudaEventQuery: function(event: cudaEvent_t): cudaError_t;stdcall;
-cudaEventSynchronize: function(event: cudaEvent_t): cudaError_t;stdcall;
-cudaEventDestroy: function(event: cudaEvent_t): cudaError_t;stdcall;
-cudaEventElapsedTime: function(var ms: Single; start: cudaEvent_t; ending: cudaEvent_t): cudaError_t;stdcall;
-cudaWGLGetDevice: function(var device: Integer; hGpu: HGPUNV): cudaError_t;stdcall;
-(* ******************************************************************************
- *                                                                              *
- *                                                                              *
- *                                                                              *
- ****************************************************************************** *)
-
-cudaThreadExit: function(): cudaError_t;stdcall;
-cudaThreadSynchronize: function(): cudaError_t;stdcall;
-cudaThreadSetLimit: function(limit: TcudaLimit; value: NativeUInt): cudaError_t;stdcall;
-cudaThreadGetLimit: function(var value: NativeUInt; limit: TcudaLimit): cudaError_t;stdcall;
-function cudaGetLastErrorString: string;
-function InitCUDART: Boolean;
-procedure CloseCUDART;
-function InitCUDARTFromLibrary(const LibName: WideString): Boolean;
-function IsCUDARTInitialized: Boolean;
-
-//--------------------------------------------
-implementation
-//--------------------------------------------
-
-function cudaGetLastErrorString: string;
-begin
-  Result := string(cudaGetErrorString(cudaGetLastError));
-end;
-
-const
-  INVALID_MODULEHANDLE = 0;
-
-var
-{$IFDEF MSWINDOWS}
-  CUDARTHandle: HINST = INVALID_MODULEHANDLE;
-{$ELSE}
-  CUDARTHandle: TLibHandle = INVALID_MODULEHANDLE;
-{$ENDIF}
-
-function CUDARTGetProcAddress(ProcName: PAnsiChar): Pointer;
-begin
-  Result := GetProcAddress(CUDARTHandle, ProcName);
-end;
-
-function InitCUDART: Boolean;
-var
-  I: Integer;
-begin
-  Result := True;
-  if CUDARTHandle = INVALID_MODULEHANDLE then
-  begin
-    for I := 0 to High(CUDARTDLLNAMES) do
-    begin
-      if InitCUDARTFromLibrary(CUDARTDLLNAMES[I] + '.dll') then
-        Exit;
-    end;
-  end;
-  Result := False;
-end;
-
-procedure CloseCUDART;
-begin
-  if CUDARTHandle <> INVALID_MODULEHANDLE then
-  begin
-    FreeLibrary(CUDARTHandle);
-    CUDARTHandle := INVALID_MODULEHANDLE;
-  end;
-end;
-
-function InitCUDARTFromLibrary(const LibName: WideString): Boolean;
-var
-  V: Integer;
-begin
-  CloseCUDART;
-  CUDARTHandle := GetModuleHandleW(PWideChar(LibName));
-  if CUDARTHandle = INVALID_MODULEHANDLE then
-    CUDARTHandle := LoadLibraryW(PWideChar(LibName));
-
-  if CUDARTHandle = INVALID_MODULEHANDLE then
-    Exit(False);
-
-  cudaFreeHost := CUDARTGetProcAddress('cudaFreeHost');
-  cudaFuncGetAttributes := CUDARTGetProcAddress('cudaFuncGetAttributes');
-  cudaGetChannelDesc := CUDARTGetProcAddress('cudaGetChannelDesc');
-  cudaGetDevice := CUDARTGetProcAddress('cudaGetDevice');
-  cudaGetDeviceCount := CUDARTGetProcAddress('cudaGetDeviceCount');
-  cudaGetDeviceProperties := CUDARTGetProcAddress('cudaGetDeviceProperties');
-  cudaGetErrorString := CUDARTGetProcAddress('cudaGetErrorString');
-  cudaGetLastError := CUDARTGetProcAddress('cudaGetLastError');
-  cudaGetSymbolAddress := CUDARTGetProcAddress('cudaGetSymbolAddress');
-  cudaGetSymbolSize := CUDARTGetProcAddress('cudaGetSymbolSize');
-  cudaGetTextureAlignmentOffset := CUDARTGetProcAddress('cudaGetTextureAlignmentOffset');
-  cudaGetTextureReference := CUDARTGetProcAddress('cudaGetTextureReference');
-  cudaGLMapBufferObject := CUDARTGetProcAddress('cudaGLMapBufferObject');
-  cudaGLMapBufferObjectAsync := CUDARTGetProcAddress('cudaGLMapBufferObjectAsync');
-  cudaGLRegisterBufferObject := CUDARTGetProcAddress('cudaGLRegisterBufferObject');
-  cudaGLSetBufferObjectMapFlags := CUDARTGetProcAddress('cudaGLSetBufferObjectMapFlags');
-  cudaGLSetGLDevice := CUDARTGetProcAddress('cudaGLSetGLDevice');
-  cudaGLUnmapBufferObject := CUDARTGetProcAddress('cudaGLUnmapBufferObject');
-  cudaGLUnmapBufferObjectAsync := CUDARTGetProcAddress('cudaGLUnmapBufferObjectAsync');
-  cudaGLUnregisterBufferObject := CUDARTGetProcAddress('cudaGLUnregisterBufferObject');
-  cudaGraphicsGLRegisterBuffer := CUDARTGetProcAddress('cudaGraphicsGLRegisterBuffer');
-  cudaGraphicsGLRegisterImage := CUDARTGetProcAddress('cudaGraphicsGLRegisterImage');
-  cudaGraphicsMapResources := CUDARTGetProcAddress('cudaGraphicsMapResources');
-  cudaGraphicsResourceGetMappedPointer := CUDARTGetProcAddress('cudaGraphicsResourceGetMappedPointer');
-  cudaGraphicsResourceSetMapFlags := CUDARTGetProcAddress('cudaGraphicsResourceSetMapFlags');
-  cudaGraphicsSubResourceGetMappedArray := CUDARTGetProcAddress('cudaGraphicsSubResourceGetMappedArray');
-  cudaGraphicsUnmapResources := CUDARTGetProcAddress('cudaGraphicsUnmapResources');
-  cudaGraphicsUnregisterResource := CUDARTGetProcAddress('cudaGraphicsUnregisterResource');
-  cudaHostAlloc := CUDARTGetProcAddress('cudaHostAlloc');
-  cudaHostGetDevicePointer := CUDARTGetProcAddress('cudaHostGetDevicePointer');
-  cudaHostGetFlags := CUDARTGetProcAddress('cudaHostGetFlags');
-  cudaLaunch := CUDARTGetProcAddress('cudaLaunch');
-  cudaMalloc := CUDARTGetProcAddress('cudaMalloc');
-  cudaMalloc3D := CUDARTGetProcAddress('cudaMalloc3D');
-  cudaMalloc3DArray := CUDARTGetProcAddress('cudaMalloc3DArray');
-  cudaMallocArray := CUDARTGetProcAddress('cudaMallocArray');
-  cudaMallocHost := CUDARTGetProcAddress('cudaMallocHost');
-  cudaMallocPitch := CUDARTGetProcAddress('cudaMallocPitch');
-  cudaMemcpy := CUDARTGetProcAddress('cudaMemcpy');
-  cudaMemcpy2D := CUDARTGetProcAddress('cudaMemcpy2D');
-  cudaMemcpy2DArrayToArray := CUDARTGetProcAddress('cudaMemcpy2DArrayToArray');
-  cudaMemcpy2DAsync := CUDARTGetProcAddress('cudaMemcpy2DAsync');
-  cudaMemcpy2DFromArray := CUDARTGetProcAddress('cudaMemcpy2DFromArray');
-  cudaMemcpy2DFromArrayAsync := CUDARTGetProcAddress('cudaMemcpy2DFromArrayAsync');
-  cudaMemcpy2DToArray := CUDARTGetProcAddress('cudaMemcpy2DToArray');
-  cudaMemcpy2DToArrayAsync := CUDARTGetProcAddress('cudaMemcpy2DToArrayAsync');
-  cudaMemcpy3D := CUDARTGetProcAddress('cudaMemcpy3D');
-  cudaMemcpy3DAsync := CUDARTGetProcAddress('cudaMemcpy3DAsync');
-  cudaMemcpyArrayToArray := CUDARTGetProcAddress('cudaMemcpyArrayToArray');
-  cudaMemcpyAsync := CUDARTGetProcAddress('cudaMemcpyAsync');
-  cudaMemcpyFromArray := CUDARTGetProcAddress('cudaMemcpyFromArray');
-  cudaMemcpyFromArrayAsync := CUDARTGetProcAddress('cudaMemcpyFromArrayAsync');
-  cudaMemcpyFromSymbol := CUDARTGetProcAddress('cudaMemcpyFromSymbol');
-  cudaMemcpyFromSymbolAsync := CUDARTGetProcAddress('cudaMemcpyFromSymbolAsync');
-  cudaMemcpyToArray := CUDARTGetProcAddress('cudaMemcpyToArray');
-  cudaMemcpyToArrayAsync := CUDARTGetProcAddress('cudaMemcpyToArrayAsync');
-  cudaMemcpyToSymbol := CUDARTGetProcAddress('cudaMemcpyToSymbol');
-  cudaMemcpyToSymbolAsync := CUDARTGetProcAddress('cudaMemcpyToSymbolAsync');
-  cudaMemGetInfo := CUDARTGetProcAddress('cudaMemGetInfo');
-  cudaMemset := CUDARTGetProcAddress('cudaMemset');
-  cudaMemset2D := CUDARTGetProcAddress('cudaMemset2D');
-  cudaMemset3D := CUDARTGetProcAddress('cudaMemset3D');
-  cudaRuntimeGetVersion := CUDARTGetProcAddress('cudaRuntimeGetVersion');
-  cudaSetDevice := CUDARTGetProcAddress('cudaSetDevice');
-  cudaSetDeviceFlags := CUDARTGetProcAddress('cudaSetDeviceFlags');
-  cudaSetDoubleForDevice := CUDARTGetProcAddress('cudaSetDoubleForDevice');
-  cudaSetDoubleForHost := CUDARTGetProcAddress('cudaSetDoubleForHost');
-  cudaSetupArgument := CUDARTGetProcAddress('cudaSetupArgument');
-  cudaSetValidDevices := CUDARTGetProcAddress('cudaSetValidDevices');
-  cudaStreamCreate := CUDARTGetProcAddress('cudaStreamCreate');
-  cudaStreamDestroy := CUDARTGetProcAddress('cudaStreamDestroy');
-  cudaStreamQuery := CUDARTGetProcAddress('cudaStreamQuery');
-  cudaStreamSynchronize := CUDARTGetProcAddress('cudaStreamSynchronize');
-  cudaThreadExit := CUDARTGetProcAddress('cudaThreadExit');
-  cudaThreadSynchronize := CUDARTGetProcAddress('cudaThreadSynchronize');
-  cudaThreadSetLimit := CUDARTGetProcAddress('cudaThreadSetLimit');
-  cudaThreadGetLimit := CUDARTGetProcAddress('cudaThreadGetLimit');
-  cudaUnbindTexture := CUDARTGetProcAddress('cudaUnbindTexture');
-  cudaWGLGetDevice := CUDARTGetProcAddress('cudaWGLGetDevice');
-
-  cudaRuntimeGetVersion(V);
-  Result := True;
-end;
-
-function IsCUDARTInitialized: Boolean;
-begin
-  Result := (CUDARTHandle <> INVALID_MODULEHANDLE);
-end;
-
-//-----------------------------------------------
-initialization
-//-----------------------------------------------
-
-//-----------------------------------------------
-finalization
-//-----------------------------------------------
-
-CloseCUDART;
-
-end.

+ 0 - 1220
Source/Import.FMODdyn.pas

@@ -1,1220 +0,0 @@
-//
-// The graphics rendering engine GLScene http://glscene.org
-//
-
-unit Import.FMODdyn;
-
-(*============================================================================================ 
-  FMOD Main header file. Copyright (c), FireLight Technologies Pty, Ltd. 1999-2003. 
-  =========================================================================================== 
-
-  NOTE: For the demos to run you must have either fmod.dll (in Windows)
-  or libfmod-3.75.so (in Linux) installed.
-
-  In Winapi.Windows, copy the fmod.dll file found in the api directory to either of
-  the following locations (in order of preference)
-  - your application directory
-  - Windows\System (95/98) or WinNT\System32 (NT/2000/XP)
-
-  In Linux, make sure you are signed in as root and copy the libfmod-3.75.so
-  file from the api directory to your /usr/lib/ directory.
-  Then via a command line, navigate to the /usr/lib/ directory and create
-  a symbolic link between libfmod-3.75.so and libfmod.so. This is done with
-  the following command (assuming you are in /usr/lib/)...
-  ln -s libfmod-3.75.so libfmod.so.
- =============================================================================================*) 
-
-interface
-
-{$I GLScene.inc}
-
-uses
-
-{$IFDEF MSWINDOWS}
-  Winapi.Windows,
-{$ENDIF}
-  GLS.Logger,
-  Import.FMODtypes;
-
-(*===============================================================================================
-  FUNCTION PROTOTYPES
-  ==============================================================================================*)
-
-// ================================== 
-// Library load/unload functions. 
-// ================================== 
-
-(*
-  If no library name is passed to FMOD_Load, then the default library name
-  used.
-*)
-
-function FMOD_Load(LibName: PChar = nil): boolean;
-procedure FMOD_Unload;
-
-// ================================== 
-// Initialization / Global functions. 
-// ================================== 
-
-(*
-  Pre FSOUND_Init functions. These can't be called after FSOUND_Init is
-  called (they will fail). They set up FMOD system functionality.
-*)
-
-var
-  FSOUND_SetOutput: function(OutputType: TFSoundOutputTypes): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetDriver: function(Driver: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetMixer: function(Mixer: TFSoundMixerTypes): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetBufferSize: function(LenMs: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetHWND: function(Hwnd: THandle): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetMinHardwareChannels: function(Min: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetMaxHardwareChannels: function(Max: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetMemorySystem: function(Pool: Pointer; PoolLen: integer; 
-    UserAlloc: TFSoundAllocCallback; UserRealloc: TFSoundReallocCallback; UserFree: TFSoundFreeCallback): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
- (*
-    Main initialization / closedown functions
-    Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override with MIDI playback.
-    : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible
-    no matter which window is in focus. (FSOUND_OUTPUT_DSOUND only)
- *)
-
-var
-  FSOUND_Init: function(MixRate: integer; MaxSoftwareChannels: integer; Flags: cardinal): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Close: procedure; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
- (*
-    Runtime system level functions
- *)
-
-var
-  FSOUND_Update: procedure; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  // This is called to update 3d sound / non-realtime output
-  FSOUND_SetSpeakerMode: procedure(SpeakerMode: cardinal); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetSFXMasterVolume: procedure(Volume: integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetPanSeperation: procedure(PanSep: single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_File_SetCallbacks: procedure(OpenCallback: TFSoundOpenCallback;
-    CloseCallback: TFSoundCloseCallback; ReadCallback: TFSoundReadCallback;
-    SeekCallback: TFSoundSeekCallback; TellCallback: TFSoundTellCallback);
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
- (*
-    System information functions
- *)
-
-var
-  FSOUND_GetError: function: TFModErrors; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetVersion: function: single; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetOutput: function: TFSoundOutputTypes; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetOutputHandle: function: Pointer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetDriver: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetMixer: function: TFSoundMixerTypes; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetNumDrivers: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetDriverName: function(Id: integer): PChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetDriverCaps: function(Id: integer; var Caps: cardinal): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-var
-  FSOUND_GetOutputRate: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetMaxChannels: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetMaxSamples: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetSpeakerMode: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetSFXMasterVolume: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetNumHWChannels: function(var Num2D: integer; var Num3D: integer; var Total: integer): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetChannelsPlaying: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetCPUUsage: function: single; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetMemoryStats: procedure(var CurrentAlloced: cardinal; var MaxAlloced: cardinal); 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-// =================================== 
-// Sample management / load functions. 
-// =================================== 
-
-(*
-   Sample creation and management functions
-   Note : Use FSOUND_LOADMEMORY  flag with FSOUND_Sample_Load to load from memory.
-   Use FSOUND_LOADRAW  flag with FSOUND_Sample_Load to treat as as raw pcm data.
-*)
-
-var
-  FSOUND_Sample_Load: function(Index: integer; const NameOrData: PChar;
-    Mode: cardinal; Offset: integer; Length: integer): PFSoundSample;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_Alloc: function(Index: integer; Length: integer; Mode: cardinal;
-    DefFreq: integer; DefVol: integer; DefPan: integer; DefPri: integer)
-    : PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_Free: procedure(Sptr: PFSoundSample); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_Upload: function(Sptr: PFSoundSample; SrcData: Pointer;
-    Mode: cardinal): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_Lock: function(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};
-  FSOUND_Sample_Unlock: function(Sptr: PFSoundSample; Ptr1: Pointer;
-    Ptr2: Pointer; Len1: cardinal; Len2: cardinal): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
- (*
-    Sample control functions
- *)
-
-var
-  FSOUND_Sample_SetMode: function(Sptr: PFSoundSample; Mode: cardinal): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_SetLoopPoints: function(Sptr: PFSoundSample; LoopStart, LoopEnd: integer): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_SetDefaults: function(Sptr: PFSoundSample;
-    DefFreq, DefVol, DefPan, DefPri: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_SetDefaultsEx: function(Sptr: PFSoundSample;
-    DefFreq, DefVol, DefPan, DefPri, VarFreq, VarVol, VarPan: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_SetMinMaxDistance: function(Sptr: PFSoundSample; Min, Max: single): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_SetMaxPlaybacks: function(Sptr: PFSoundSample; Max: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Sample information functions
-*)
-
-var
-  FSOUND_Sample_Get: function(SampNo: integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetName: function(Sptr: PFSoundSample): PChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetLength: function(Sptr: PFSoundSample): cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetLoopPoints: function(Sptr: PFSoundSample; var LoopStart: integer; var LoopEnd: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetDefaults: function(Sptr: PFSoundSample; var DefFreq: integer;
-    var DefVol: integer; var DefPan: integer; var DefPri: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetDefaultsEx: function(Sptr: PFSoundSample;
-    var DefFreq: integer; var DefVol: integer; var DefPan: integer;
-    var DefPri: integer; var VarFreq: integer; var VarVol: integer; var VarPan): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetMode: function(Sptr: PFSoundSample): cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Sample_GetMinMaxDistance: function(Sptr: PFSoundSample; var Min: single; var Max: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-// ============================ 
-// Channel control functions. 
-// ============================ 
-
-(*
-    Playing and stopping sounds.
-    Note : Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
-    Use FSOUND_ALL as the 'channel' variable to control ALL channels with one function call!
-*)
-
-var
-  FSOUND_PlaySound: function(Channel: integer; Sptr: PFSoundSample): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_PlaySoundEx: function(Channel: integer; Sptr: PFSoundSample;
-    Dsp: PFSoundDSPUnit; StartPaused: bytebool): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_StopSound: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
- (*
-    Functions to control playback of a channel.
- *)
-
-var
-  FSOUND_SetFrequency: function(Channel: integer; Freq: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetVolume: function(Channel: integer; Vol: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetVolumeAbsolute: function(Channel: integer; Vol: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetPan: function(Channel: integer; Pan: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetSurround: function(Channel: integer; Surround: bytebool): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetMute: function(Channel: integer; Mute: bytebool): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetPriority: function(Channel: integer; Priority: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetReserved: function(Channel: integer; Reserved: bytebool): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetPaused: function(Channel: integer; Paused: bytebool): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetLoopMode: function(Channel: integer; LoopMode: cardinal): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_SetCurrentPosition: function(Channel: integer; Offset: cardinal): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_SetAttributes: function(Channel: integer; Pos: PFSoundVector; Vel: PFSoundVector): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_SetMinMaxDistance: function(Channel: integer; Min: single; Max: single): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Channel information functions
-*)
-
-var
-  FSOUND_IsPlaying: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetFrequency: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetVolume: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetAmplitude: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetPan: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetSurround: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetMute: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetPriority: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetReserved: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetPaused: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetLoopMode: function(Channel: integer): cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetCurrentPosition: function(Channel: integer): cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetCurrentSample: function(Channel: integer): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetCurrentLevels: function(Channel: integer; L, R: PSingle): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetNumSubChannels: function(Channel: integer): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_GetSubChannel: function(Channel: integer; SubChannel: integer): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_GetAttributes: function(Channel: integer; Pos: PFSoundVector; Vel: PFSoundVector): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_GetMinMaxDistance: function(Channel: integer; var Min: single; var Max: single): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*=================== 
-  3D sound functions. 
-  ===================*)
-
- (*
-    See also 3d sample and channel based functions above.
-    Call FSOUND_Update once a frame to process 3d information.
- *)
-
-var
-  FSOUND_3D_Listener_SetCurrent: procedure(current: integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_Listener_SetAttributes: procedure(Pos: PFSoundVector; 
-    Vel: PFSoundVector; fx: single; fy: single; fz: single; tx: single; ty: single; tz: single); 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_Listener_GetAttributes: procedure(Pos: PFSoundVector;
-    Vel: PFSoundVector; fx: PSingle; fy: PSingle; fz: PSingle; tx: PSingle; ty: PSingle; tz: PSingle); 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_SetDopplerFactor: procedure(Scale: single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_SetDistanceFactor: procedure(Scale: single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_3D_SetRolloffFactor: procedure(Scale: single); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*=================== 
-   FX functions. 
-  ===================*)
-
-(*
-    Functions to control DX8 only effects processing.
-
-    - FX enabled samples can only be played once at a time, not multiple times at once.
-    - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
-    - FSOUND_INIT_ENABLESYSTEMCHANNELFX can be used to apply hardware effect processing to the
-    global mixed output of FMOD's software channels.
-    - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
-    - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
-    it will return a unique handle for each FX.
-    - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
-    - Stopping or starting a sound resets all FX and they must be re-enabled each time
-    if this happens.
- *)
-
-var
-  // Set bits to enable following fx 
-  FSOUND_FX_Enable: function(Channel: integer; fx: TFSoundFXModes): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; 
-  FSOUND_FX_Disable: function(Channel: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetChorus: function(FXId: integer; WetDryMix, Depth, Feedback, 
-    Frequency: single; Waveform: integer; Delay: single; Phase: integer): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetCompressor: function(FXId: integer; Gain, Attack, Release, Threshold, Ratio, Predelay: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetDistortion: function(FXId: integer; Gain, Edge, PostEQCenterFrequency, PostEQBandwidth, PreLowpassCutoff: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetEcho: function(FXId: integer; WetDryMix, Feedback, LeftDelay, RightDelay: single; PanDelay: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetFlanger: function(FXId: integer; WetDryMix, Depth, Feedback, Frequency: single; Waveform: integer;
-    Delay: single; Phase: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetGargle: function(FXId, RateHz, WaveShape: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetI3DL2Reverb: function(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};
-  FSOUND_FX_SetParamEQ: function(FXId: integer; Center, Bandwidth, Gain: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_FX_SetWavesReverb: function(FXId: integer; InGain, ReverbMix, ReverbTime, HighFreqRTRatio: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(* ========================= 
-  File Streaming functions. 
-  =========================*) 
-
- (*
-    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Stream_Open to stream from memory.
-    Use FSOUND_LOADRAW      flag with FSOUND_Stream_Open to treat stream as raw pcm data.
-    Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_Open to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
-    Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
- *)
-
-var
-  // call this before opening streams, not after
-  FSOUND_Stream_SetBufferSize: function(Ms: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Open: function(const name_or_data: PChar; Mode: cardinal; Offset: integer; Length: integer): PFSoundStream;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Create: function(Callback: TFSoundStreamCallback;
-    Length: integer; Mode: cardinal; SampleRate: integer; UserData: integer): PFSoundStream;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Close: function(Stream: PFSoundStream): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Play: function(Channel: integer; Stream: PFSoundStream): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_PlayEx: function(Channel: integer; Stream: PFSoundStream;
-    Dsp: PFSoundDSPUnit; StartPaused: bytebool): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Stop: function(Stream: PFSoundStream): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetPosition: function(Stream: PFSoundStream; Position: cardinal): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetPosition: function(Stream: PFSoundStream): cardinal; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetTime: function(Stream: PFSoundStream; Ms: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetTime: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetLength: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetLengthMs: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_SetMode: function(Stream: PFSoundStream; Mode: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetMode: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetLoopPoints: function(Stream: PFSoundStream; LoopStartPCM, LoopEndPCM: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetLoopCount: function(Stream: PFSoundStream; Count: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetOpenState: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetSample: function(Stream: PFSoundStream): PFSoundSample; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  // Every stream contains a sample to play back on 
-  FSOUND_Stream_CreateDSP: function(Stream: PFSoundStream;
-    Callback: TFSoundDSPCallback; Priority: integer; Param: integer): PFSoundDSPUnit;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_SetEndCallback: function(Stream: PFSoundStream; Callback: TFSoundStreamCallback; UserData: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetSyncCallback: function(Stream: PFSoundStream; Callback: TFSoundStreamCallback; UserData: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_AddSyncPoint: function(Stream: PFSoundStream; PCMOffset: cardinal; Name: PChar): PFSyncPoint;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_DeleteSyncPoint: function(Point: PFSyncPoint): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetNumSyncPoints: function(Stream: PFSoundStream): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetSyncPoint: function(Stream: PFSoundStream; Index: integer): PFSyncPoint; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetSyncPointInfo: function(Point: PFSyncPoint;
-    var PCMOffset: cardinal): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_SetSubStream: function(Stream: PFSoundStream; Index: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetNumSubStreams: function(Stream: PFSoundStream): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_SetSubStreamSentence: function(Stream: PFSoundStream; var sentencelist: cardinal; numitems: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_GetNumTagFields: function(Stream: PFSoundStream; var Num: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_GetTagField: function(Stream: PFSoundStream; Num: integer; 
-    var _Type: TFSoundTagFieldType; var Name: PChar; var Value: Pointer;
-    var Length: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_FindTagField: function(Stream: PFSoundStream;
-    _Type: TFSoundTagFieldType; Name: PChar; var Value: Pointer;
-    var Length: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  FSOUND_Stream_Net_SetProxy: function(Proxy: PChar): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Net_GetLastServerStatus: function: PChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Net_SetBufferProperties: function(BufferSize: integer;
-    PreBuffer_Percent: integer; ReBuffer_Percent: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Net_GetBufferProperties: function(var BufferSize: integer;
-    var PreBuffer_Percent: integer; var ReBuffer_Percent: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Net_SetMetadataCallback: function(Stream: PFSoundStream;
-    Callback: TFMetaDataCallback; UserData: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Stream_Net_GetStatus: function(Stream: PFSoundStream;
-    var Status: TFSoundStreamNetStatus; var BufferPercentUsed: integer;
-    var BitRate: integer; var Flags: cardinal): bytebool;
-   {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(* =================== 
-   CD audio functions. 
-   =================== *)
-
-(*
-    Note : 0 = default cdrom.  Otherwise specify the drive letter, for example. 'D'.
-*)
-
-var
-  FSOUND_CD_Play: function(Drive: byte; Track: integer): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_SetPlayMode: procedure(Drive: byte; Mode: integer);
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_Stop: function(Drive: byte): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_SetPaused: function(Drive: byte; Paused: bytebool): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_SetVolume: function(Drive: byte; Volume: integer): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_SetTrackTime: function(Drive: byte; Ms: integer): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_OpenTray: function(Drive: byte; Open: byte): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-var
-  FSOUND_CD_GetPaused: function(Drive: byte): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_GetTrack: function(Drive: byte): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_GetNumTracks: function(Drive: byte): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_GetVolume: function(Drive: byte): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_GetTrackLength: function(Drive: byte; Track: integer): integer;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_CD_GetTrackTime: function(Drive: byte): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*============== 
-  DSP functions. 
-  ==============*)
-
-(*
-    DSP Unit control and information functions.
-*)
-
-var
-  FSOUND_DSP_Create: function(Callback: TFSoundDSPCallback; Priority: integer; Param: integer): PFSoundDSPUnit;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_Free: procedure(DSPUnit: PFSoundDSPUnit); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_SetPriority: procedure(DSPUnit: PFSoundDSPUnit; Priority: integer); {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetPriority: function(DSPUnit: PFSoundDSPUnit): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_SetActive: procedure(DSPUnit: PFSoundDSPUnit; Active: bytebool);
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetActive: function(DSPUnit: PFSoundDSPUnit): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-  {
-    Functions to get hold of FSOUND 'system DSP unit' handles.
-  }
-
-var
-  FSOUND_DSP_GetClearUnit: function: PFSoundDSPUnit;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetSFXUnit: function: PFSoundDSPUnit;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetMusicUnit: function: PFSoundDSPUnit;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetClipAndCopyUnit: function: PFSoundDSPUnit;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_GetFFTUnit: function: PFSoundDSPUnit;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Miscellaneous DSP functions
-    Note for the spectrum analysis function to work, you have to enable the FFT DSP unit with
-    the following code FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);
-    It is off by default to save cpu usage.
-*) 
-
-var
-  FSOUND_DSP_MixBuffers: function(DestBuffer: Pointer; SrcBuffer: Pointer;
-    Len: integer; Freq: integer; Vol: integer; Pan: integer; Mode: cardinal): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_DSP_ClearMixBuffer: procedure; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  // Length of each DSP update 
-  FSOUND_DSP_GetBufferLength: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF}; 
-  // Total buffer length due to FSOUND_SetBufferSize 
-  FSOUND_DSP_GetBufferLengthTotal: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  // Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. 
-  FSOUND_DSP_GetSpectrum: function: PSingle; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*========================================================================== 
-  Reverb functions. (eax2/eax3 reverb)  (NOT SUPPORTED IN LINUX/CE) 
-  ==========================================================================*) 
-
-(*
-    See structures above for definitions and information on the reverb parameters.
-*)
-
-var
-  FSOUND_Reverb_SetProperties: function(const Prop: TFSoundReverbProperties)
-    : bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Reverb_GetProperties: function(var Prop: TFSoundReverbProperties)
-    : bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Reverb_SetChannelProperties: function(Channel: integer;
-    var Prop: TFSoundReverbChannelProperties): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Reverb_GetChannelProperties: function(Channel: integer;
-    var Prop: TFSoundReverbChannelProperties): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-// ================================================ 
-// Recording functions  (NOT SUPPORTED IN LINUX/MAC) 
-// ================================================ 
-
-(*
-    Recording initialization functions
-*)
-
-var
-  FSOUND_Record_SetDriver: function(OutputType: integer): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Record_GetNumDrivers: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Record_GetDriverName: function(Id: integer): PChar; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Record_GetDriver: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Recording functionality. Only one recording session will work at a time.
-*)
-
-var
-  FSOUND_Record_StartSample: function(Sptr: PFSoundSample; Loop: bytebool): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Record_Stop: function: bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FSOUND_Record_GetPosition: function: integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-// ============================================================================================= 
-// FMUSIC API (MOD,S3M,XM,IT,MIDI PLAYBACK) 
-// ============================================================================================= 
-
-(*
-    Song management / playback functions.
-*)
-
-var
-  FMUSIC_LoadSong: function(const Name: PChar): PFMusicModule; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_LoadSongEx: function(name_or_data: Pointer; Offset: integer; Length: integer; Mode: cardinal; var SampleList: integer;
-    SampleListNum: integer): PFMusicModule; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetOpenState: function(Module: PFMusicModule): integer; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_FreeSong: function(Module: PFMusicModule): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_PlaySong: function(Module: PFMusicModule): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_StopSong: function(Module: PFMusicModule): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_StopAllSongs: procedure; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-var
-  FMUSIC_SetZxxCallback: function(Module: PFMusicModule; Callback: TFMusicCallback): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetRowCallback: function(Module: PFMusicModule; Callback: TFMusicCallback; RowStep: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetOrderCallback: function(Module: PFMusicModule; Callback: TFMusicCallback; OrderStep: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetInstCallback: function(Module: PFMusicModule; Callback: TFMusicCallback; Instrument: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-var
-  FMUSIC_SetSample: function(Module: PFMusicModule; SampNo: integer; Sptr: PFSoundSample): bytebool; 
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetUserData: function(Module: PFMusicModule; UserData: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_OptimizeChannels: function(Module: PFMusicModule; MaxChannels: integer; MinVolume: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Runtime song functions.
-*)
-
-var
-  FMUSIC_SetReverb: function(Reverb: bytebool): bytebool; {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetLooping: function(Module: PFMusicModule; Looping: bytebool): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetOrder: function(Module: PFMusicModule; Order: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetPaused: function(Module: PFMusicModule; Pause: bytebool): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetMasterVolume: function(Module: PFMusicModule; Volume: integer): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetMasterSpeed: function(Module: PFMusicModule; Speed: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_SetPanSeperation: function(Module: PFMusicModule; PanSep: single): bytebool;
-    {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Static song information functions.
-*)
-
-var
-  FMUSIC_GetName: function(Module: PFMusicModule): PChar;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetType: function(Module: PFMusicModule): TFMusicTypes;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetNumOrders: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetNumPatterns: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetNumInstruments: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetNumSamples: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetNumChannels: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetSample: function(Module: PFMusicModule; SampNo: integer): PFSoundSample;
-  {$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetPatternLength: function(Module: PFMusicModule;
-    OrderNo: integer): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-(*
-    Runtime song information.
-*)
-
-var
-  FMUSIC_IsFinished: function(Module: PFMusicModule): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_IsPlaying: function(Module: PFMusicModule): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetMasterVolume: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetGlobalVolume: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetOrder: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetPattern: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetSpeed: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetBPM: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetRow: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetPaused: function(Module: PFMusicModule): bytebool;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetTime: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetRealChannel: function(Module: PFMusicModule;
-    ModChannel: integer): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-  FMUSIC_GetUserData: function(Module: PFMusicModule): integer;
-{$IFDEF UNIX} cdecl {$ELSE} stdcall {$ENDIF};
-
-//----------------------------------------------------------------------
-implementation
-//----------------------------------------------------------------------
-
-{$IFDEF UNIX}
-{$IFDEF LINUX}
-uses
-  Libc;
-{$ENDIF}
-uses
-  dynlibs;
-{$ENDIF}
-
-const
-{$IFDEF LINUX}
-  FMOD_DLL = 'libfmod.so';
-{$ELSE}
-{$IFDEF MSWINDOWS}
-  FMOD_DLL = 'fmod.dll';
-{$ENDIF}
-{$IFDEF DARWIN}
-  FMOD_DLL = 'fmod.dylib';
-{$ENDIF}
-{$ENDIF}
-
-type
-{$IFDEF UNIX}
-  TFMODModuleHandle = TLibHandle;
-{$ELSE}
-  TFMODModuleHandle = HINST;
-{$ENDIF}
-
-const
-  INVALID_MODULEHANDLE_VALUE = TFMODModuleHandle(0);
-
-var
-  FMODHandle: TFMODModuleHandle;
-
-function GetAddress(Handle: TFMODModuleHandle; FuncName: PChar): Pointer;
-begin
-  Result := GetProcAddress(Handle, FuncName);
-  if not Assigned(Result) then
-    GLSLogger.LogErrorFmt('Failed to find "%s" in "%s"', [FuncName, FMOD_DLL]);
-end;
-
-function FMOD_Load(LibName: PChar): boolean;
-begin
-  Result := False;
-
-  { Make sure the previous library is unloaded }
-  FMOD_Unload;
-
-  { If no library name given, use the default library names }
-  if LibName = nil then
-    LibName := FMOD_DLL;
-
-  { Load the library }
-  FMODHandle := INVALID_MODULEHANDLE_VALUE;
-  FMODHandle := LoadLibrary(LibName);
-
-  if FMODHandle = INVALID_MODULEHANDLE_VALUE then
-    Exit;
-
-  // Get all the function addresses from the library 
-{$IFDEF MSWINDOWS}
-  FMUSIC_FreeSong := GetAddress(FMODHandle, '_FMUSIC_FreeSong@4');
-  FMUSIC_GetBPM := GetAddress(FMODHandle, '_FMUSIC_GetBPM@4');
-  FMUSIC_GetGlobalVolume := GetAddress(FMODHandle, '_FMUSIC_GetGlobalVolume@4');
-  FMUSIC_GetMasterVolume := GetAddress(FMODHandle, '_FMUSIC_GetMasterVolume@4');
-  FMUSIC_GetName := GetAddress(FMODHandle, '_FMUSIC_GetName@4');
-  FMUSIC_GetNumChannels := GetAddress(FMODHandle, '_FMUSIC_GetNumChannels@4');
-  FMUSIC_GetNumInstruments := GetAddress(FMODHandle, '_FMUSIC_GetNumInstruments@4');
-  FMUSIC_GetNumOrders := GetAddress(FMODHandle, '_FMUSIC_GetNumOrders@4');
-  FMUSIC_GetNumPatterns := GetAddress(FMODHandle, '_FMUSIC_GetNumPatterns@4');
-  FMUSIC_GetNumSamples := GetAddress(FMODHandle, '_FMUSIC_GetNumSamples@4');
-  FMUSIC_GetOpenState := GetAddress(FMODHandle, '_FMUSIC_GetOpenState@4');
-  FMUSIC_GetOrder := GetAddress(FMODHandle, '_FMUSIC_GetOrder@4');
-  FMUSIC_GetPattern := GetAddress(FMODHandle, '_FMUSIC_GetPattern@4');
-  FMUSIC_GetPatternLength := GetAddress(FMODHandle, '_FMUSIC_GetPatternLength@8');
-  FMUSIC_GetPaused := GetAddress(FMODHandle, '_FMUSIC_GetPaused@4');
-  FMUSIC_GetRealChannel := GetAddress(FMODHandle, '_FMUSIC_GetRealChannel@8');
-  FMUSIC_GetRow := GetAddress(FMODHandle, '_FMUSIC_GetRow@4');
-  FMUSIC_GetSample := GetAddress(FMODHandle, '_FMUSIC_GetSample@8');
-  FMUSIC_GetSpeed := GetAddress(FMODHandle, '_FMUSIC_GetSpeed@4');
-  FMUSIC_GetTime := GetAddress(FMODHandle, '_FMUSIC_GetTime@4');
-  FMUSIC_GetType := GetAddress(FMODHandle, '_FMUSIC_GetType@4');
-  FMUSIC_GetUserData := GetAddress(FMODHandle, '_FMUSIC_GetUserData@4');
-  FMUSIC_IsFinished := GetAddress(FMODHandle, '_FMUSIC_IsFinished@4');
-  FMUSIC_IsPlaying := GetAddress(FMODHandle, '_FMUSIC_IsPlaying@4');
-  FMUSIC_LoadSong := GetAddress(FMODHandle, '_FMUSIC_LoadSong@4');
-  FMUSIC_LoadSongEx := GetAddress(FMODHandle, '_FMUSIC_LoadSongEx@24');
-  FMUSIC_OptimizeChannels := GetAddress(FMODHandle, '_FMUSIC_OptimizeChannels@12');
-  FMUSIC_PlaySong := GetAddress(FMODHandle, '_FMUSIC_PlaySong@4');
-  FMUSIC_SetInstCallback := GetAddress(FMODHandle, '_FMUSIC_SetInstCallback@12');
-  FMUSIC_SetLooping := GetAddress(FMODHandle, '_FMUSIC_SetLooping@8');
-  FMUSIC_SetMasterSpeed := GetAddress(FMODHandle, '_FMUSIC_SetMasterSpeed@8');
-  FMUSIC_SetMasterVolume := GetAddress(FMODHandle, '_FMUSIC_SetMasterVolume@8');
-  FMUSIC_SetOrder := GetAddress(FMODHandle, '_FMUSIC_SetOrder@8');
-  FMUSIC_SetOrderCallback := GetAddress(FMODHandle, '_FMUSIC_SetOrderCallback@12');
-  FMUSIC_SetPanSeperation := GetAddress(FMODHandle, '_FMUSIC_SetPanSeperation@8');
-  FMUSIC_SetPaused := GetAddress(FMODHandle, '_FMUSIC_SetPaused@8');
-  FMUSIC_SetReverb := GetAddress(FMODHandle, '_FMUSIC_SetReverb@4');
-  FMUSIC_SetRowCallback := GetAddress(FMODHandle, '_FMUSIC_SetRowCallback@12');
-  FMUSIC_SetSample := GetAddress(FMODHandle, '_FMUSIC_SetSample@12');
-  FMUSIC_SetUserData := GetAddress(FMODHandle, '_FMUSIC_SetUserData@8');
-  FMUSIC_SetZxxCallback := GetAddress(FMODHandle, '_FMUSIC_SetZxxCallback@8');
-  FMUSIC_StopAllSongs := GetAddress(FMODHandle, '_FMUSIC_StopAllSongs@0');
-  FMUSIC_StopSong := GetAddress(FMODHandle, '_FMUSIC_StopSong@4');
-  FSOUND_3D_GetAttributes := GetAddress(FMODHandle, '_FSOUND_3D_GetAttributes@12');
-  FSOUND_3D_GetMinMaxDistance := GetAddress(FMODHandle, '_FSOUND_3D_GetMinMaxDistance@12');
-  FSOUND_3D_Listener_GetAttributes := GetAddress(FMODHandle, '_FSOUND_3D_Listener_GetAttributes@32');
-  FSOUND_3D_Listener_SetAttributes := GetAddress(FMODHandle, '_FSOUND_3D_Listener_SetAttributes@32');
-  FSOUND_3D_Listener_SetCurrent := GetAddress(FMODHandle, '_FSOUND_3D_Listener_SetCurrent@8');
-  FSOUND_3D_SetAttributes := GetAddress(FMODHandle, '_FSOUND_3D_SetAttributes@12');
-  FSOUND_3D_SetDistanceFactor := GetAddress(FMODHandle, '_FSOUND_3D_SetDistanceFactor@4');
-  FSOUND_3D_SetDopplerFactor := GetAddress(FMODHandle, '_FSOUND_3D_SetDopplerFactor@4');
-  FSOUND_3D_SetMinMaxDistance := GetAddress(FMODHandle, '_FSOUND_3D_SetMinMaxDistance@12');
-  FSOUND_3D_SetRolloffFactor := GetAddress(FMODHandle, '_FSOUND_3D_SetRolloffFactor@4');
-  // FSOUND_CD_Eject  := GetAddress(FMODHandle,'_FSOUND_CD_Eject@4');
-  FSOUND_CD_GetNumTracks := GetAddress(FMODHandle, '_FSOUND_CD_GetNumTracks@4');
-  FSOUND_CD_GetPaused := GetAddress(FMODHandle, '_FSOUND_CD_GetPaused@4');
-  FSOUND_CD_GetTrack := GetAddress(FMODHandle, '_FSOUND_CD_GetTrack@4');
-  FSOUND_CD_GetTrackLength := GetAddress(FMODHandle, '_FSOUND_CD_GetTrackLength@8');
-  FSOUND_CD_GetTrackTime := GetAddress(FMODHandle, '_FSOUND_CD_GetTrackTime@4');
-  FSOUND_CD_GetVolume := GetAddress(FMODHandle, '_FSOUND_CD_GetVolume@4');
-  FSOUND_CD_OpenTray := GetAddress(FMODHandle, '_FSOUND_CD_OpenTray@8');
-  FSOUND_CD_Play := GetAddress(FMODHandle, '_FSOUND_CD_Play@8');
-  FSOUND_CD_SetPaused := GetAddress(FMODHandle, '_FSOUND_CD_SetPaused@8');
-  FSOUND_CD_SetPlayMode := GetAddress(FMODHandle, '_FSOUND_CD_SetPlayMode@8');
-  FSOUND_CD_SetTrackTime := GetAddress(FMODHandle, '_FSOUND_CD_SetTrackTime@8');
-  FSOUND_CD_SetVolume := GetAddress(FMODHandle, '_FSOUND_CD_SetVolume@8');
-  FSOUND_CD_Stop := GetAddress(FMODHandle, '_FSOUND_CD_Stop@4');
-  FSOUND_Close := GetAddress(FMODHandle, '_FSOUND_Close@0');
-  FSOUND_DSP_ClearMixBuffer := GetAddress(FMODHandle, '_FSOUND_DSP_ClearMixBuffer@0');
-  FSOUND_DSP_Create := GetAddress(FMODHandle, '_FSOUND_DSP_Create@12');
-  FSOUND_DSP_Free := GetAddress(FMODHandle, '_FSOUND_DSP_Free@4');
-  FSOUND_DSP_GetActive := GetAddress(FMODHandle, '_FSOUND_DSP_GetActive@4');
-  FSOUND_DSP_GetBufferLength := GetAddress(FMODHandle, '_FSOUND_DSP_GetBufferLength@0');
-  FSOUND_DSP_GetBufferLengthTotal := GetAddress(FMODHandle, '_FSOUND_DSP_GetBufferLengthTotal@0');
-  FSOUND_DSP_GetClearUnit := GetAddress(FMODHandle, '_FSOUND_DSP_GetClearUnit@0');
-  FSOUND_DSP_GetClipAndCopyUnit := GetAddress(FMODHandle, '_FSOUND_DSP_GetClipAndCopyUnit@0');
-  FSOUND_DSP_GetFFTUnit := GetAddress(FMODHandle, '_FSOUND_DSP_GetFFTUnit@0');
-  FSOUND_DSP_GetMusicUnit := GetAddress(FMODHandle, '_FSOUND_DSP_GetMusicUnit@0');
-  FSOUND_DSP_GetPriority := GetAddress(FMODHandle, '_FSOUND_DSP_GetPriority@4');
-  FSOUND_DSP_GetSFXUnit := GetAddress(FMODHandle, '_FSOUND_DSP_GetSFXUnit@0');
-  FSOUND_DSP_GetSpectrum := GetAddress(FMODHandle, '_FSOUND_DSP_GetSpectrum@0');
-  FSOUND_DSP_MixBuffers := GetAddress(FMODHandle, '_FSOUND_DSP_MixBuffers@28');
-  FSOUND_DSP_SetActive := GetAddress(FMODHandle, '_FSOUND_DSP_SetActive@8');
-  FSOUND_DSP_SetPriority := GetAddress(FMODHandle, '_FSOUND_DSP_SetPriority@8');
-  FSOUND_File_SetCallbacks := GetAddress(FMODHandle, '_FSOUND_File_SetCallbacks@20');
-  FSOUND_FX_Disable := GetAddress(FMODHandle, '_FSOUND_FX_Disable@4');
-  FSOUND_FX_Enable := GetAddress(FMODHandle, '_FSOUND_FX_Enable@8');
-  FSOUND_FX_SetChorus := GetAddress(FMODHandle, '_FSOUND_FX_SetChorus@32');
-  FSOUND_FX_SetCompressor := GetAddress(FMODHandle, '_FSOUND_FX_SetCompressor@28');
-  FSOUND_FX_SetDistortion := GetAddress(FMODHandle, '_FSOUND_FX_SetDistortion@24');
-  FSOUND_FX_SetEcho := GetAddress(FMODHandle, '_FSOUND_FX_SetEcho@24');
-  FSOUND_FX_SetFlanger := GetAddress(FMODHandle, '_FSOUND_FX_SetFlanger@32');
-  FSOUND_FX_SetGargle := GetAddress(FMODHandle, '_FSOUND_FX_SetGargle@12');
-  FSOUND_FX_SetI3DL2Reverb := GetAddress(FMODHandle, '_FSOUND_FX_SetI3DL2Reverb@52');
-  FSOUND_FX_SetParamEQ := GetAddress(FMODHandle, '_FSOUND_FX_SetParamEQ@16');
-  FSOUND_FX_SetWavesReverb := GetAddress(FMODHandle, '_FSOUND_FX_SetWavesReverb@20');
-  FSOUND_GetAmplitude := GetAddress(FMODHandle, '_FSOUND_GetAmplitude@4');
-  FSOUND_GetChannelsPlaying := GetAddress(FMODHandle, '_FSOUND_GetChannelsPlaying@0');
-  FSOUND_GetCPUUsage := GetAddress(FMODHandle, '_FSOUND_GetCPUUsage@0');
-  FSOUND_GetCurrentLevels := GetAddress(FMODHandle, '_FSOUND_GetCurrentLevels@12');
-  FSOUND_GetCurrentPosition := GetAddress(FMODHandle, '_FSOUND_GetCurrentPosition@4');
-  FSOUND_GetCurrentSample := GetAddress(FMODHandle, '_FSOUND_GetCurrentSample@4');
-  FSOUND_GetDriver := GetAddress(FMODHandle, '_FSOUND_GetDriver@0');
-  FSOUND_GetDriverCaps := GetAddress(FMODHandle, '_FSOUND_GetDriverCaps@8');
-  FSOUND_GetDriverName := GetAddress(FMODHandle, '_FSOUND_GetDriverName@4');
-  FSOUND_GetError := GetAddress(FMODHandle, '_FSOUND_GetError@0');
-  FSOUND_GetFrequency := GetAddress(FMODHandle, '_FSOUND_GetFrequency@4');
-  FSOUND_GetLoopMode := GetAddress(FMODHandle, '_FSOUND_GetLoopMode@4');
-  FSOUND_GetMaxChannels := GetAddress(FMODHandle, '_FSOUND_GetMaxChannels@0');
-  FSOUND_GetMaxSamples := GetAddress(FMODHandle, '_FSOUND_GetMaxSamples@0');
-  FSOUND_GetMemoryStats := GetAddress(FMODHandle, '_FSOUND_GetMemoryStats@8');
-  FSOUND_GetMixer := GetAddress(FMODHandle, '_FSOUND_GetMixer@0');
-  FSOUND_GetMute := GetAddress(FMODHandle, '_FSOUND_GetMute@4');
-  FSOUND_GetNumDrivers := GetAddress(FMODHandle, '_FSOUND_GetNumDrivers@0');
-  // FSOUND_GetNumHardwareChannels  := GetAddress(FMODHandle,'_FSOUND_GetNumHardwareChannels@0');
-  FSOUND_GetNumHWChannels := GetAddress(FMODHandle, '_FSOUND_GetNumHWChannels@12');
-  FSOUND_GetNumSubChannels := GetAddress(FMODHandle, '_FSOUND_GetNumSubChannels@4');
-  FSOUND_GetOutput := GetAddress(FMODHandle, '_FSOUND_GetOutput@0');
-  FSOUND_GetOutputHandle := GetAddress(FMODHandle, '_FSOUND_GetOutputHandle@0');
-  FSOUND_GetOutputRate := GetAddress(FMODHandle, '_FSOUND_GetOutputRate@0');
-  FSOUND_GetPan := GetAddress(FMODHandle, '_FSOUND_GetPan@4');
-  FSOUND_GetPaused := GetAddress(FMODHandle, '_FSOUND_GetPaused@4');
-  FSOUND_GetPriority := GetAddress(FMODHandle, '_FSOUND_GetPriority@4');
-  FSOUND_GetReserved := GetAddress(FMODHandle, '_FSOUND_GetReserved@4');
-  FSOUND_GetSFXMasterVolume := GetAddress(FMODHandle, '_FSOUND_GetSFXMasterVolume@0');
-  FSOUND_GetSpeakerMode := GetAddress(FMODHandle, '_FSOUND_GetSpeakerMode@0');
-  FSOUND_GetSubChannel := GetAddress(FMODHandle, '_FSOUND_GetSubChannel@8');
-  FSOUND_GetSurround := GetAddress(FMODHandle, '_FSOUND_GetSurround@4');
-  FSOUND_GetVersion := GetAddress(FMODHandle, '_FSOUND_GetVersion@0');
-  FSOUND_GetVolume := GetAddress(FMODHandle, '_FSOUND_GetVolume@4');
-  FSOUND_Init := GetAddress(FMODHandle, '_FSOUND_Init@12');
-  FSOUND_IsPlaying := GetAddress(FMODHandle, '_FSOUND_IsPlaying@4');
-  FSOUND_PlaySound := GetAddress(FMODHandle, '_FSOUND_PlaySound@8');
-  FSOUND_PlaySoundEx := GetAddress(FMODHandle, '_FSOUND_PlaySoundEx@16');
-  FSOUND_Record_GetDriver := GetAddress(FMODHandle, '_FSOUND_Record_GetDriver@0');
-  FSOUND_Record_GetDriverName := GetAddress(FMODHandle, '_FSOUND_Record_GetDriverName@4');
-  FSOUND_Record_GetNumDrivers := GetAddress(FMODHandle, '_FSOUND_Record_GetNumDrivers@0');
-  FSOUND_Record_GetPosition := GetAddress(FMODHandle, '_FSOUND_Record_GetPosition@0');
-  FSOUND_Record_SetDriver := GetAddress(FMODHandle, '_FSOUND_Record_SetDriver@4');
-  FSOUND_Record_StartSample := GetAddress(FMODHandle, '_FSOUND_Record_StartSample@8');
-  FSOUND_Record_Stop := GetAddress(FMODHandle, '_FSOUND_Record_Stop@0');
-  FSOUND_Reverb_GetChannelProperties := GetAddress(FMODHandle, '_FSOUND_Reverb_GetChannelProperties@8');
-  FSOUND_Reverb_GetProperties := GetAddress(FMODHandle, '_FSOUND_Reverb_GetProperties@4');
-  FSOUND_Reverb_SetChannelProperties := GetAddress(FMODHandle, '_FSOUND_Reverb_SetChannelProperties@8');
-  FSOUND_Reverb_SetProperties := GetAddress(FMODHandle, '_FSOUND_Reverb_SetProperties@4');
-  FSOUND_Sample_Alloc := GetAddress(FMODHandle, '_FSOUND_Sample_Alloc@28');
-  FSOUND_Sample_Free := GetAddress(FMODHandle, '_FSOUND_Sample_Free@4');
-  FSOUND_Sample_Get := GetAddress(FMODHandle, '_FSOUND_Sample_Get@4');
-  FSOUND_Sample_GetDefaults := GetAddress(FMODHandle, '_FSOUND_Sample_GetDefaults@20');
-  FSOUND_Sample_GetDefaultsEx := GetAddress(FMODHandle, '_FSOUND_Sample_GetDefaultsEx@32');
-  FSOUND_Sample_GetLength := GetAddress(FMODHandle, '_FSOUND_Sample_GetLength@4');
-  FSOUND_Sample_GetLoopPoints := GetAddress(FMODHandle, '_FSOUND_Sample_GetLoopPoints@12');
-  FSOUND_Sample_GetMinMaxDistance := GetAddress(FMODHandle, '_FSOUND_Sample_GetMinMaxDistance@12');
-  FSOUND_Sample_GetMode := GetAddress(FMODHandle, '_FSOUND_Sample_GetMode@4');
-  FSOUND_Sample_GetName := GetAddress(FMODHandle, '_FSOUND_Sample_GetName@4');
-  FSOUND_Sample_Load := GetAddress(FMODHandle, '_FSOUND_Sample_Load@20');
-  FSOUND_Sample_Lock := GetAddress(FMODHandle, '_FSOUND_Sample_Lock@28');
-  FSOUND_Sample_SetDefaults := GetAddress(FMODHandle, '_FSOUND_Sample_SetDefaults@20');
-  FSOUND_Sample_SetDefaultsEx := GetAddress(FMODHandle, '_FSOUND_Sample_SetDefaultsEx@32');
-  FSOUND_Sample_SetLoopPoints := GetAddress(FMODHandle, '_FSOUND_Sample_SetLoopPoints@12');
-  FSOUND_Sample_SetMaxPlaybacks := GetAddress(FMODHandle, '_FSOUND_Sample_SetMaxPlaybacks@8');
-  FSOUND_Sample_SetMinMaxDistance := GetAddress(FMODHandle, '_FSOUND_Sample_SetMinMaxDistance@12');
-  FSOUND_Sample_SetMode := GetAddress(FMODHandle, '_FSOUND_Sample_SetMode@8');
-  FSOUND_Sample_Unlock := GetAddress(FMODHandle, '_FSOUND_Sample_Unlock@20');
-  FSOUND_Sample_Upload := GetAddress(FMODHandle, '_FSOUND_Sample_Upload@12');
-  FSOUND_SetBufferSize := GetAddress(FMODHandle, '_FSOUND_SetBufferSize@4');
-  FSOUND_SetCurrentPosition := GetAddress(FMODHandle, '_FSOUND_SetCurrentPosition@8');
-  FSOUND_SetDriver := GetAddress(FMODHandle, '_FSOUND_SetDriver@4');
-  FSOUND_SetFrequency := GetAddress(FMODHandle, '_FSOUND_SetFrequency@8');
-  // FSOUND_SetFrequencyEx := GetAddress(FMODHandle,'_FSOUND_SetFrequencyEx@8');
-  FSOUND_SetHWND := GetAddress(FMODHandle, '_FSOUND_SetHWND@4');
-  FSOUND_SetLoopMode := GetAddress(FMODHandle, '_FSOUND_SetLoopMode@8');
-  FSOUND_SetMaxHardwareChannels := GetAddress(FMODHandle, '_FSOUND_SetMaxHardwareChannels@4');
-  FSOUND_SetMemorySystem := GetAddress(FMODHandle, '_FSOUND_SetMemorySystem@20');
-  FSOUND_SetMinHardwareChannels := GetAddress(FMODHandle, '_FSOUND_SetMinHardwareChannels@4');
-  FSOUND_SetMixer := GetAddress(FMODHandle, '_FSOUND_SetMixer@4');
-  FSOUND_SetMute := GetAddress(FMODHandle, '_FSOUND_SetMute@8');
-  FSOUND_SetOutput := GetAddress(FMODHandle, '_FSOUND_SetOutput@4');
-  FSOUND_SetPan := GetAddress(FMODHandle, '_FSOUND_SetPan@8');
-  FSOUND_SetPanSeperation := GetAddress(FMODHandle, '_FSOUND_SetPanSeperation@4');
-  FSOUND_SetPaused := GetAddress(FMODHandle, '_FSOUND_SetPaused@8');
-  FSOUND_SetPriority := GetAddress(FMODHandle, '_FSOUND_SetPriority@8');
-  FSOUND_SetReserved := GetAddress(FMODHandle, '_FSOUND_SetReserved@8');
-  FSOUND_SetSFXMasterVolume := GetAddress(FMODHandle, '_FSOUND_SetSFXMasterVolume@4');
-  FSOUND_SetSpeakerMode := GetAddress(FMODHandle, '_FSOUND_SetSpeakerMode@4');
-  FSOUND_SetSurround := GetAddress(FMODHandle, '_FSOUND_SetSurround@8');
-  FSOUND_SetVolume := GetAddress(FMODHandle, '_FSOUND_SetVolume@8');
-  FSOUND_SetVolumeAbsolute := GetAddress(FMODHandle, '_FSOUND_SetVolumeAbsolute@8');
-  FSOUND_StopSound := GetAddress(FMODHandle, '_FSOUND_StopSound@4');
-  FSOUND_Stream_AddSyncPoint := GetAddress(FMODHandle, '_FSOUND_Stream_AddSyncPoint@12');
-  FSOUND_Stream_Close := GetAddress(FMODHandle, '_FSOUND_Stream_Close@4');
-  FSOUND_Stream_Create := GetAddress(FMODHandle, '_FSOUND_Stream_Create@20');
-  FSOUND_Stream_CreateDSP := GetAddress(FMODHandle, '_FSOUND_Stream_CreateDSP@16');
-  FSOUND_Stream_DeleteSyncPoint := GetAddress(FMODHandle, '_FSOUND_Stream_DeleteSyncPoint@4');
-  FSOUND_Stream_FindTagField := GetAddress(FMODHandle, '_FSOUND_Stream_FindTagField@20');
-  FSOUND_Stream_GetLength := GetAddress(FMODHandle, '_FSOUND_Stream_GetLength@4');
-  FSOUND_Stream_GetLengthMs := GetAddress(FMODHandle, '_FSOUND_Stream_GetLengthMs@4');
-  FSOUND_Stream_GetMode := GetAddress(FMODHandle, '_FSOUND_Stream_GetMode@4');
-  FSOUND_Stream_GetNumSubStreams := GetAddress(FMODHandle, '_FSOUND_Stream_GetNumSubStreams@4');
-  FSOUND_Stream_GetNumSyncPoints := GetAddress(FMODHandle, '_FSOUND_Stream_GetNumSyncPoints@4');
-  FSOUND_Stream_GetNumTagFields := GetAddress(FMODHandle, '_FSOUND_Stream_GetNumTagFields@8');
-  FSOUND_Stream_GetOpenState := GetAddress(FMODHandle, '_FSOUND_Stream_GetOpenState@4');
-  FSOUND_Stream_GetPosition := GetAddress(FMODHandle, '_FSOUND_Stream_GetPosition@4');
-  FSOUND_Stream_GetSample := GetAddress(FMODHandle, '_FSOUND_Stream_GetSample@4');
-  FSOUND_Stream_GetSyncPoint := GetAddress(FMODHandle, '_FSOUND_Stream_GetSyncPoint@8');
-  FSOUND_Stream_GetSyncPointInfo := GetAddress(FMODHandle, '_FSOUND_Stream_GetSyncPointInfo@8');
-  FSOUND_Stream_GetTagField := GetAddress(FMODHandle, '_FSOUND_Stream_GetTagField@24');
-  FSOUND_Stream_GetTime := GetAddress(FMODHandle, '_FSOUND_Stream_GetTime@4');
-  FSOUND_Stream_Net_GetBufferProperties := GetAddress(FMODHandle, '_FSOUND_Stream_Net_GetBufferProperties@12');
-  FSOUND_Stream_Net_GetLastServerStatus := GetAddress(FMODHandle, '_FSOUND_Stream_Net_GetLastServerStatus@0');
-  FSOUND_Stream_Net_GetStatus := GetAddress(FMODHandle, '_FSOUND_Stream_Net_GetStatus@20');
-  FSOUND_Stream_Net_SetBufferProperties := GetAddress(FMODHandle, '_FSOUND_Stream_Net_SetBufferProperties@12');
-  FSOUND_Stream_Net_SetMetadataCallback := GetAddress(FMODHandle, '_FSOUND_Stream_Net_SetMetadataCallback@12');
-  // FSOUND_Stream_Net_SetNetDataCallback := GetAddress(FMODHandle,'_FSOUND_Stream_Net_SetNetDataCallback@8');
-  FSOUND_Stream_Net_SetProxy := GetAddress(FMODHandle, '_FSOUND_Stream_Net_SetProxy@4');
-  // FSOUND_Stream_Net_SetTimeout := GetAddress(FMODHandle,'_FSOUND_Stream_Net_SetTimeout@4');
-  FSOUND_Stream_Open := GetAddress(FMODHandle, '_FSOUND_Stream_Open@16');
-  FSOUND_Stream_Play := GetAddress(FMODHandle, '_FSOUND_Stream_Play@8');
-  FSOUND_Stream_PlayEx := GetAddress(FMODHandle, '_FSOUND_Stream_PlayEx@16');
-  FSOUND_Stream_SetBufferSize := GetAddress(FMODHandle, '_FSOUND_Stream_SetBufferSize@4');
-  FSOUND_Stream_SetEndCallback := GetAddress(FMODHandle, '_FSOUND_Stream_SetEndCallback@12');
-  FSOUND_Stream_SetLoopCount := GetAddress(FMODHandle, '_FSOUND_Stream_SetLoopCount@8');
-  FSOUND_Stream_SetLoopPoints := GetAddress(FMODHandle, '_FSOUND_Stream_SetLoopPoints@12');
-  FSOUND_Stream_SetMode := GetAddress(FMODHandle, '_FSOUND_Stream_SetMode@8');
-  // FSOUND_Stream_SetPCM := GetAddress(FMODHandle,'_FSOUND_Stream_SetPCM@8');
-  FSOUND_Stream_SetPosition := GetAddress(FMODHandle, '_FSOUND_Stream_SetPosition@8');
-  FSOUND_Stream_SetSubStream := GetAddress(FMODHandle, '_FSOUND_Stream_SetSubStream@8');
-  FSOUND_Stream_SetSubStreamSentence := GetAddress(FMODHandle, '_FSOUND_Stream_SetSubStreamSentence@12');
-  FSOUND_Stream_SetSyncCallback := GetAddress(FMODHandle, '_FSOUND_Stream_SetSyncCallback@12');
-  FSOUND_Stream_SetTime := GetAddress(FMODHandle, '_FSOUND_Stream_SetTime@8');
-  FSOUND_Stream_Stop := GetAddress(FMODHandle, '_FSOUND_Stream_Stop@4');
-  FSOUND_Update := GetAddress(FMODHandle, '_FSOUND_Update@0');
-{$ELSE}
-  FSOUND_SetOutput := GetAddress(FMODHandle, 'FSOUND_SetOutput');
-  FSOUND_SetDriver := GetAddress(FMODHandle, 'FSOUND_SetDriver');
-  FSOUND_SetMixer := GetAddress(FMODHandle, 'FSOUND_SetMixer');
-  FSOUND_SetBufferSize := GetAddress(FMODHandle, 'FSOUND_SetBufferSize');
-  FSOUND_SetHWND := GetAddress(FMODHandle, 'FSOUND_SetHWND');
-  FSOUND_SetMinHardwareChannels := GetAddress(FMODHandle, 'FSOUND_SetMinHardwareChannels');
-  FSOUND_SetMaxHardwareChannels := GetAddress(FMODHandle, 'FSOUND_SetMaxHardwareChannels');
-  FSOUND_SetMemorySystem := GetAddress(FMODHandle, 'FSOUND_SetMemorySystem');
-  FSOUND_Init := GetAddress(FMODHandle, 'FSOUND_Init');
-  FSOUND_Close := GetAddress(FMODHandle, 'FSOUND_Close');
-  FSOUND_Update := GetAddress(FMODHandle, 'FSOUND_Update');
-  FSOUND_SetSpeakerMode := GetAddress(FMODHandle, 'FSOUND_SetSpeakerMode');
-  FSOUND_SetSFXMasterVolume := GetAddress(FMODHandle, 'FSOUND_SetSFXMasterVolume');
-  FSOUND_SetPanSeperation := GetAddress(FMODHandle, 'FSOUND_SetPanSeperation');
-  FSOUND_GetError := GetAddress(FMODHandle, 'FSOUND_GetError');
-  FSOUND_GetVersion := GetAddress(FMODHandle, 'FSOUND_GetVersion');
-  FSOUND_GetOutput := GetAddress(FMODHandle, 'FSOUND_GetOutput');
-  FSOUND_GetOutputHandle := GetAddress(FMODHandle, 'FSOUND_GetOutputHandle');
-  FSOUND_GetDriver := GetAddress(FMODHandle, 'FSOUND_GetDriver');
-  FSOUND_GetMixer := GetAddress(FMODHandle, 'FSOUND_GetMixer');
-  FSOUND_GetNumDrivers := GetAddress(FMODHandle, 'FSOUND_GetNumDrivers');
-  FSOUND_GetDriverName := GetAddress(FMODHandle, 'FSOUND_GetDriverName');
-  FSOUND_GetDriverCaps := GetAddress(FMODHandle, 'FSOUND_GetDriverCaps');
-  FSOUND_GetOutputRate := GetAddress(FMODHandle, 'FSOUND_GetOutputRate');
-  FSOUND_GetMaxChannels := GetAddress(FMODHandle, 'FSOUND_GetMaxChannels');
-  FSOUND_GetMaxSamples := GetAddress(FMODHandle, 'FSOUND_GetMaxSamples');
-  FSOUND_GetSpeakerMode := GetAddress(FMODHandle, 'FSOUND_GetSpeakerMode');
-  FSOUND_GetSFXMasterVolume := GetAddress(FMODHandle, 'FSOUND_GetSFXMasterVolume');
-  FSOUND_GetNumHWChannels := GetAddress(FMODHandle, 'FSOUND_GetNumHWChannels');
-  FSOUND_GetChannelsPlaying := GetAddress(FMODHandle, 'FSOUND_GetChannelsPlaying');
-  FSOUND_GetCPUUsage := GetAddress(FMODHandle, 'FSOUND_GetCPUUsage');
-  FSOUND_GetMemoryStats := GetAddress(FMODHandle, 'FSOUND_GetMemoryStats');
-  FSOUND_Sample_Load := GetAddress(FMODHandle, 'FSOUND_Sample_Load');
-  FSOUND_Sample_Alloc := GetAddress(FMODHandle, 'FSOUND_Sample_Alloc');
-  FSOUND_Sample_Free := GetAddress(FMODHandle, 'FSOUND_Sample_Free');
-  FSOUND_Sample_Upload := GetAddress(FMODHandle, 'FSOUND_Sample_Upload');
-  FSOUND_Sample_Lock := GetAddress(FMODHandle, 'FSOUND_Sample_Lock');
-  FSOUND_Sample_Unlock := GetAddress(FMODHandle, 'FSOUND_Sample_Unlock');
-  FSOUND_Sample_SetMode := GetAddress(FMODHandle, 'FSOUND_Sample_SetMode');
-  FSOUND_Sample_SetLoopPoints := GetAddress(FMODHandle, 'FSOUND_Sample_SetLoopPoints');
-  FSOUND_Sample_SetDefaults := GetAddress(FMODHandle, 'FSOUND_Sample_SetDefaults');
-  FSOUND_Sample_SetDefaultsEx := GetAddress(FMODHandle, 'FSOUND_Sample_SetDefaultsEx');
-  FSOUND_Sample_SetMinMaxDistance := GetAddress(FMODHandle, 'FSOUND_Sample_SetMinMaxDistance');
-  FSOUND_Sample_SetMaxPlaybacks := GetAddress(FMODHandle, 'FSOUND_Sample_SetMaxPlaybacks');
-  FSOUND_Sample_Get := GetAddress(FMODHandle, 'FSOUND_Sample_Get');
-  FSOUND_Sample_GetName := GetAddress(FMODHandle, 'FSOUND_Sample_GetName');
-  FSOUND_Sample_GetLength := GetAddress(FMODHandle, 'FSOUND_Sample_GetLength');
-  FSOUND_Sample_GetLoopPoints := GetAddress(FMODHandle, 'FSOUND_Sample_GetLoopPoints');
-  FSOUND_Sample_GetDefaults := GetAddress(FMODHandle, 'FSOUND_Sample_GetDefaults');
-  FSOUND_Sample_GetDefaultsEx := GetAddress(FMODHandle, 'FSOUND_Sample_GetDefaultsEx');
-  FSOUND_Sample_GetMode := GetAddress(FMODHandle, 'FSOUND_Sample_GetMode');
-  FSOUND_Sample_GetMinMaxDistance := GetAddress(FMODHandle, 'FSOUND_Sample_GetMinMaxDistance');
-  FSOUND_PlaySound := GetAddress(FMODHandle, 'FSOUND_PlaySound');
-  FSOUND_PlaySoundEx := GetAddress(FMODHandle, 'FSOUND_PlaySoundEx');
-  FSOUND_StopSound := GetAddress(FMODHandle, 'FSOUND_StopSound');
-  FSOUND_SetFrequency := GetAddress(FMODHandle, 'FSOUND_SetFrequency');
-  FSOUND_SetVolume := GetAddress(FMODHandle, 'FSOUND_SetVolume');
-  FSOUND_SetVolumeAbsolute := GetAddress(FMODHandle, 'FSOUND_SetVolumeAbsolute');
-  FSOUND_SetPan := GetAddress(FMODHandle, 'FSOUND_SetPan');
-  FSOUND_SetSurround := GetAddress(FMODHandle, 'FSOUND_SetSurround');
-  FSOUND_SetMute := GetAddress(FMODHandle, 'FSOUND_SetMute');
-  FSOUND_SetPriority := GetAddress(FMODHandle, 'FSOUND_SetPriority');
-  FSOUND_SetReserved := GetAddress(FMODHandle, 'FSOUND_SetReserved');
-  FSOUND_SetPaused := GetAddress(FMODHandle, 'FSOUND_SetPaused');
-  FSOUND_SetLoopMode := GetAddress(FMODHandle, 'FSOUND_SetLoopMode');
-  FSOUND_SetCurrentPosition := GetAddress(FMODHandle, 'FSOUND_SetCurrentPosition');
-  FSOUND_3D_SetAttributes := GetAddress(FMODHandle, 'FSOUND_3D_SetAttributes');
-  FSOUND_3D_SetMinMaxDistance := GetAddress(FMODHandle, 'FSOUND_3D_SetMinMaxDistance');
-  FSOUND_IsPlaying := GetAddress(FMODHandle, 'FSOUND_IsPlaying');
-  FSOUND_GetFrequency := GetAddress(FMODHandle, 'FSOUND_GetFrequency');
-  FSOUND_GetVolume := GetAddress(FMODHandle, 'FSOUND_GetVolume');
-  FSOUND_GetAmplitude := GetAddress(FMODHandle, 'FSOUND_GetAmplitude');
-  FSOUND_GetPan := GetAddress(FMODHandle, 'FSOUND_GetPan');
-  FSOUND_GetSurround := GetAddress(FMODHandle, 'FSOUND_GetSurround');
-  FSOUND_GetMute := GetAddress(FMODHandle, 'FSOUND_GetMute');
-  FSOUND_GetPriority := GetAddress(FMODHandle, 'FSOUND_GetPriority');
-  FSOUND_GetReserved := GetAddress(FMODHandle, 'FSOUND_GetReserved');
-  FSOUND_GetPaused := GetAddress(FMODHandle, 'FSOUND_GetPaused');
-  FSOUND_GetLoopMode := GetAddress(FMODHandle, 'FSOUND_GetLoopMode');
-  FSOUND_GetCurrentPosition := GetAddress(FMODHandle, 'FSOUND_GetCurrentPosition');
-  FSOUND_GetCurrentSample := GetAddress(FMODHandle, 'FSOUND_GetCurrentSample');
-  FSOUND_GetCurrentLevels := GetAddress(FMODHandle, 'FSOUND_GetCurrentLevels');
-  FSOUND_GetNumSubChannels := GetAddress(FMODHandle, 'FSOUND_GetNumSubChannels');
-  FSOUND_GetSubChannel := GetAddress(FMODHandle, 'FSOUND_GetSubChannel');
-  FSOUND_3D_GetAttributes := GetAddress(FMODHandle, 'FSOUND_3D_GetAttributes');
-  FSOUND_3D_GetMinMaxDistance := GetAddress(FMODHandle, 'FSOUND_3D_GetMinMaxDistance');
-  FSOUND_3D_Listener_SetCurrent := GetAddress(FMODHandle, 'FSOUND_3D_Listener_SetCurrent');
-  FSOUND_3D_Listener_SetAttributes := GetAddress(FMODHandle, 'FSOUND_3D_Listener_SetAttributes');
-  FSOUND_3D_Listener_GetAttributes := GetAddress(FMODHandle, 'FSOUND_3D_Listener_GetAttributes');
-  FSOUND_3D_SetDopplerFactor := GetAddress(FMODHandle, 'FSOUND_3D_SetDopplerFactor');
-  FSOUND_3D_SetDistanceFactor := GetAddress(FMODHandle, 'FSOUND_3D_SetDistanceFactor');
-  FSOUND_3D_SetRolloffFactor := GetAddress(FMODHandle, 'FSOUND_3D_SetRolloffFactor');
-  FSOUND_FX_Enable := GetAddress(FMODHandle, 'FSOUND_FX_Enable');
-  FSOUND_FX_SetChorus := GetAddress(FMODHandle, 'FSOUND_FX_SetChorus');
-  FSOUND_FX_SetCompressor := GetAddress(FMODHandle, 'FSOUND_FX_SetCompressor');
-  FSOUND_FX_SetDistortion := GetAddress(FMODHandle, 'FSOUND_FX_SetDistortion');
-  FSOUND_FX_SetEcho := GetAddress(FMODHandle, 'FSOUND_FX_SetEcho');
-  FSOUND_FX_SetFlanger := GetAddress(FMODHandle, 'FSOUND_FX_SetFlanger');
-  FSOUND_FX_SetGargle := GetAddress(FMODHandle, 'FSOUND_FX_SetGargle');
-  FSOUND_FX_SetI3DL2Reverb := GetAddress(FMODHandle, 'FSOUND_FX_SetI3DL2Reverb');
-  FSOUND_FX_SetParamEQ := GetAddress(FMODHandle, 'FSOUND_FX_SetParamEQ');
-  FSOUND_FX_SetWavesReverb := GetAddress(FMODHandle, 'FSOUND_FX_SetWavesReverb');
-  FSOUND_Stream_Open := GetAddress(FMODHandle, 'FSOUND_Stream_Open');
-  FSOUND_Stream_Create := GetAddress(FMODHandle, 'FSOUND_Stream_Create');
-  FSOUND_Stream_Close := GetAddress(FMODHandle, 'FSOUND_Stream_Close');
-  FSOUND_Stream_Play := GetAddress(FMODHandle, 'FSOUND_Stream_Play');
-  FSOUND_Stream_PlayEx := GetAddress(FMODHandle, 'FSOUND_Stream_PlayEx');
-  FSOUND_Stream_Stop := GetAddress(FMODHandle, 'FSOUND_Stream_Stop');
-  FSOUND_Stream_SetEndCallback := GetAddress(FMODHandle, 'FSOUND_Stream_SetEndCallback');
-  FSOUND_Stream_SetSyncCallback := GetAddress(FMODHandle, 'FSOUND_Stream_SetSyncCallback');
-  FSOUND_Stream_GetSample := GetAddress(FMODHandle, 'FSOUND_Stream_GetSample');
-  FSOUND_Stream_CreateDSP := GetAddress(FMODHandle, 'FSOUND_Stream_CreateDSP');
-  FSOUND_Stream_SetBufferSize := GetAddress(FMODHandle, 'FSOUND_Stream_SetBufferSize');
-  FSOUND_Stream_SetPosition := GetAddress(FMODHandle, 'FSOUND_Stream_SetPosition');
-  FSOUND_Stream_GetPosition := GetAddress(FMODHandle, 'FSOUND_Stream_GetPosition');
-  FSOUND_Stream_SetTime := GetAddress(FMODHandle, 'FSOUND_Stream_SetTime');
-  FSOUND_Stream_GetTime := GetAddress(FMODHandle, 'FSOUND_Stream_GetTime');
-  FSOUND_Stream_GetLength := GetAddress(FMODHandle, 'FSOUND_Stream_GetLength');
-  FSOUND_Stream_GetLengthMs := GetAddress(FMODHandle, 'FSOUND_Stream_GetLengthMs');
-  FSOUND_Stream_SetMode := GetAddress(FMODHandle, 'FSOUND_Stream_SetMode');
-  FSOUND_Stream_GetMode := GetAddress(FMODHandle, 'FSOUND_Stream_GetMode');
-  FSOUND_Stream_SetLoopPoints := GetAddress(FMODHandle, 'FSOUND_Stream_SetLoopPoints');
-  FSOUND_Stream_SetLoopCount := GetAddress(FMODHandle, 'FSOUND_Stream_SetLoopCount');
-  FSOUND_Stream_GetOpenState := GetAddress(FMODHandle, 'FSOUND_Stream_GetOpenState');
-  FSOUND_Stream_AddSyncPoint := GetAddress(FMODHandle, 'FSOUND_Stream_AddSyncPoint');
-  FSOUND_Stream_DeleteSyncPoint := GetAddress(FMODHandle, 'FSOUND_Stream_DeleteSyncPoint');
-  FSOUND_Stream_GetNumSyncPoints := GetAddress(FMODHandle, 'FSOUND_Stream_GetNumSyncPoints');
-  FSOUND_Stream_GetSyncPoint := GetAddress(FMODHandle, 'FSOUND_Stream_GetSyncPoint');
-  FSOUND_Stream_GetSyncPointInfo := GetAddress(FMODHandle, 'FSOUND_Stream_GetSyncPointInfo');
-  FSOUND_Stream_SetSubStream := GetAddress(FMODHandle, 'FSOUND_Stream_SetSubStream');
-  FSOUND_Stream_GetNumSubStreams := GetAddress(FMODHandle, 'FSOUND_Stream_GetNumSubStreams');
-  FSOUND_Stream_SetSubStreamSentence := GetAddress(FMODHandle, 'FSOUND_Stream_SetSubStreamSentence');
-  FSOUND_Stream_GetNumTagFields := GetAddress(FMODHandle, 'FSOUND_Stream_GetNumTagFields');
-  FSOUND_Stream_GetTagField := GetAddress(FMODHandle, 'FSOUND_Stream_GetTagField');
-  FSOUND_Stream_FindTagField := GetAddress(FMODHandle, 'FSOUND_Stream_FindTagField');
-  FSOUND_Stream_Net_SetProxy := GetAddress(FMODHandle, 'FSOUND_Stream_Net_SetProxy');
-  FSOUND_Stream_Net_GetLastServerStatus := GetAddress(FMODHandle, 'FSOUND_Stream_Net_GetLastServerStatus');
-  FSOUND_Stream_Net_SetBufferProperties := GetAddress(FMODHandle, 'FSOUND_Stream_Net_SetBufferProperties');
-  FSOUND_Stream_Net_GetBufferProperties := GetAddress(FMODHandle, 'FSOUND_Stream_Net_GetBufferProperties');
-  FSOUND_Stream_Net_SetMetadataCallback := GetAddress(FMODHandle, 'FSOUND_Stream_Net_SetMetadataCallback');
-  FSOUND_Stream_Net_GetStatus := GetAddress(FMODHandle, 'FSOUND_Stream_Net_GetStatus');
-  FSOUND_CD_Play := GetAddress(FMODHandle, 'FSOUND_CD_Play');
-  FSOUND_CD_SetPlayMode := GetAddress(FMODHandle, 'FSOUND_CD_SetPlayMode');
-  FSOUND_CD_Stop := GetAddress(FMODHandle, 'FSOUND_CD_Stop');
-  FSOUND_CD_SetPaused := GetAddress(FMODHandle, 'FSOUND_CD_SetPaused');
-  FSOUND_CD_SetVolume := GetAddress(FMODHandle, 'FSOUND_CD_SetVolume');
-  FSOUND_CD_SetTrackTime := GetAddress(FMODHandle, 'FSOUND_CD_SetTrackTime');
-  FSOUND_CD_OpenTray := GetAddress(FMODHandle, 'FSOUND_CD_OpenTray');
-  FSOUND_CD_GetPaused := GetAddress(FMODHandle, 'FSOUND_CD_GetPaused');
-  FSOUND_CD_GetTrack := GetAddress(FMODHandle, 'FSOUND_CD_GetTrack');
-  FSOUND_CD_GetNumTracks := GetAddress(FMODHandle, 'FSOUND_CD_GetNumTracks');
-  FSOUND_CD_GetVolume := GetAddress(FMODHandle, 'FSOUND_CD_GetVolume');
-  FSOUND_CD_GetTrackLength := GetAddress(FMODHandle, 'FSOUND_CD_GetTrackLength');
-  FSOUND_CD_GetTrackTime := GetAddress(FMODHandle, 'FSOUND_CD_GetTrackTime');
-  FSOUND_DSP_Create := GetAddress(FMODHandle, 'FSOUND_DSP_Create');
-  FSOUND_DSP_Free := GetAddress(FMODHandle, 'FSOUND_DSP_Free');
-  FSOUND_DSP_SetPriority := GetAddress(FMODHandle, 'FSOUND_DSP_SetPriority');
-  FSOUND_DSP_GetPriority := GetAddress(FMODHandle, 'FSOUND_DSP_GetPriority');
-  FSOUND_DSP_SetActive := GetAddress(FMODHandle, 'FSOUND_DSP_SetActive');
-  FSOUND_DSP_GetActive := GetAddress(FMODHandle, 'FSOUND_DSP_GetActive');
-  FSOUND_DSP_GetClearUnit := GetAddress(FMODHandle, 'FSOUND_DSP_GetClearUnit');
-  FSOUND_DSP_GetSFXUnit := GetAddress(FMODHandle, 'FSOUND_DSP_GetSFXUnit');
-  FSOUND_DSP_GetMusicUnit := GetAddress(FMODHandle, 'FSOUND_DSP_GetMusicUnit');
-  FSOUND_DSP_GetClipAndCopyUnit := GetAddress(FMODHandle, 'FSOUND_DSP_GetClipAndCopyUnit');
-  FSOUND_DSP_GetFFTUnit := GetAddress(FMODHandle, 'FSOUND_DSP_GetFFTUnit');
-  FSOUND_DSP_MixBuffers := GetAddress(FMODHandle, 'FSOUND_DSP_MixBuffers');
-  FSOUND_DSP_ClearMixBuffer := GetAddress(FMODHandle, 'FSOUND_DSP_ClearMixBuffer');
-  FSOUND_DSP_GetBufferLength := GetAddress(FMODHandle, 'FSOUND_DSP_GetBufferLength');
-  FSOUND_DSP_GetBufferLengthTotal := GetAddress(FMODHandle, 'FSOUND_DSP_GetBufferLengthTotal');
-  FSOUND_DSP_GetSpectrum := GetAddress(FMODHandle, 'FSOUND_DSP_GetSpectrum');
-  FSOUND_Reverb_SetProperties := GetAddress(FMODHandle, 'FSOUND_Reverb_SetProperties');
-  FSOUND_Reverb_GetProperties := GetAddress(FMODHandle, 'FSOUND_Reverb_GetProperties');
-  FSOUND_Reverb_SetChannelProperties := GetAddress(FMODHandle, 'FSOUND_Reverb_SetChannelProperties');
-  FSOUND_Reverb_GetChannelProperties := GetAddress(FMODHandle, 'FSOUND_Reverb_GetChannelProperties');
-  FSOUND_Record_SetDriver := GetAddress(FMODHandle, 'FSOUND_Record_SetDriver');
-  FSOUND_Record_GetNumDrivers := GetAddress(FMODHandle, 'FSOUND_Record_GetNumDrivers');
-  FSOUND_Record_GetDriverName := GetAddress(FMODHandle, 'FSOUND_Record_GetDriverName');
-  FSOUND_Record_GetDriver := GetAddress(FMODHandle, 'FSOUND_Record_GetDriver');
-  FSOUND_Record_StartSample := GetAddress(FMODHandle, 'FSOUND_Record_StartSample');
-  FSOUND_Record_Stop := GetAddress(FMODHandle, 'FSOUND_Record_Stop');
-  FSOUND_Record_GetPosition := GetAddress(FMODHandle, 'FSOUND_Record_GetPosition');
-  FSOUND_File_SetCallbacks := GetAddress(FMODHandle, 'FSOUND_File_SetCallbacks');
-  FMUSIC_LoadSong := GetAddress(FMODHandle, 'FMUSIC_LoadSong');
-  FMUSIC_LoadSongEx := GetAddress(FMODHandle, 'FMUSIC_LoadSongEx');
-  FMUSIC_GetOpenState := GetAddress(FMODHandle, 'FMUSIC_GetOpenState');
-  FMUSIC_FreeSong := GetAddress(FMODHandle, 'FMUSIC_FreeSong');
-  FMUSIC_PlaySong := GetAddress(FMODHandle, 'FMUSIC_PlaySong');
-  FMUSIC_StopSong := GetAddress(FMODHandle, 'FMUSIC_StopSong');
-  FMUSIC_StopAllSongs := GetAddress(FMODHandle, 'FMUSIC_StopAllSongs');
-  FMUSIC_SetZxxCallback := GetAddress(FMODHandle, 'FMUSIC_SetZxxCallback');
-  FMUSIC_SetRowCallback := GetAddress(FMODHandle, 'FMUSIC_SetRowCallback');
-  FMUSIC_SetOrderCallback := GetAddress(FMODHandle, 'FMUSIC_SetOrderCallback');
-  FMUSIC_SetInstCallback := GetAddress(FMODHandle, 'FMUSIC_SetInstCallback');
-  FMUSIC_SetSample := GetAddress(FMODHandle, 'FMUSIC_SetSample');
-  FMUSIC_SetUserData := GetAddress(FMODHandle, 'FMUSIC_SetUserData');
-  FMUSIC_OptimizeChannels := GetAddress(FMODHandle, 'FMUSIC_OptimizeChannels');
-  FMUSIC_SetReverb := GetAddress(FMODHandle, 'FMUSIC_SetReverb');
-  FMUSIC_SetLooping := GetAddress(FMODHandle, 'FMUSIC_SetLooping');
-  FMUSIC_SetOrder := GetAddress(FMODHandle, 'FMUSIC_SetOrder');
-  FMUSIC_SetPaused := GetAddress(FMODHandle, 'FMUSIC_SetPaused');
-  FMUSIC_SetMasterVolume := GetAddress(FMODHandle, 'FMUSIC_SetMasterVolume');
-  FMUSIC_SetMasterSpeed := GetAddress(FMODHandle, 'FMUSIC_SetMasterSpeed');
-  FMUSIC_SetPanSeperation := GetAddress(FMODHandle, 'FMUSIC_SetPanSeperation');
-  FMUSIC_GetName := GetAddress(FMODHandle, 'FMUSIC_GetName');
-  FMUSIC_GetType := GetAddress(FMODHandle, 'FMUSIC_GetType');
-  FMUSIC_GetNumOrders := GetAddress(FMODHandle, 'FMUSIC_GetNumOrders');
-  FMUSIC_GetNumPatterns := GetAddress(FMODHandle, 'FMUSIC_GetNumPatterns');
-  FMUSIC_GetNumInstruments := GetAddress(FMODHandle, 'FMUSIC_GetNumInstruments');
-  FMUSIC_GetNumSamples := GetAddress(FMODHandle, 'FMUSIC_GetNumSamples');
-  FMUSIC_GetNumChannels := GetAddress(FMODHandle, 'FMUSIC_GetNumChannels');
-  FMUSIC_GetSample := GetAddress(FMODHandle, 'FMUSIC_GetSample');
-  FMUSIC_GetPatternLength := GetAddress(FMODHandle, 'FMUSIC_GetPatternLength');
-  FMUSIC_IsFinished := GetAddress(FMODHandle, 'FMUSIC_IsFinished');
-  FMUSIC_IsPlaying := GetAddress(FMODHandle, 'FMUSIC_IsPlaying');
-  FMUSIC_GetMasterVolume := GetAddress(FMODHandle, 'FMUSIC_GetMasterVolume');
-  FMUSIC_GetGlobalVolume := GetAddress(FMODHandle, 'FMUSIC_GetGlobalVolume');
-  FMUSIC_GetOrder := GetAddress(FMODHandle, 'FMUSIC_GetOrder');
-  FMUSIC_GetPattern := GetAddress(FMODHandle, 'FMUSIC_GetPattern');
-  FMUSIC_GetSpeed := GetAddress(FMODHandle, 'FMUSIC_GetSpeed');
-  FMUSIC_GetBPM := GetAddress(FMODHandle, 'FMUSIC_GetBPM');
-  FMUSIC_GetRow := GetAddress(FMODHandle, 'FMUSIC_GetRow');
-  FMUSIC_GetPaused := GetAddress(FMODHandle, 'FMUSIC_GetPaused');
-  FMUSIC_GetTime := GetAddress(FMODHandle, 'FMUSIC_GetTime');
-  FMUSIC_GetRealChannel := GetAddress(FMODHandle, 'FMUSIC_GetRealChannel');
-  FMUSIC_GetUserData := GetAddress(FMODHandle, 'FMUSIC_GetUserData');
-{$ENDIF}
-  Result := True;
-end;
-
-procedure FMOD_Unload;
-begin
-  { Only free the library if it was already loaded }
-  if FMODHandle <> INVALID_MODULEHANDLE_VALUE then
-    FreeLibrary(FMODHandle);
-
-  FMODHandle := INVALID_MODULEHANDLE_VALUE;
-end;
-
-var
-  Saved8087CW: word;
-
-//-----------------------------------------
-initialization
-//-----------------------------------------
-
-{ Save the current FPU state and then disable FPU exceptions }
-Saved8087CW := Default8087CW;
-Set8087CW($133F); { Disable all fpu exceptions }
-
-finalization
-
-{ Make sure the library is unloaded }
-FMOD_Unload;
-{ Reset the FPU to the previous state }
-Set8087CW(Saved8087CW);
-
-end.

+ 1 - 1
Source/Import.BASS.pas → Source/Imports.BASS.pas

@@ -11,7 +11,7 @@
 
   NOTE: Delphi users should use the BASS_UNICODE flag where possible
 *)
-unit Import.BASS;
+unit Imports.BASS;
 
 interface
 

+ 1 - 1
Source/Import.CUDAApi.pas → Source/Imports.CUDAApi.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.CUDAApi;
+unit Imports.CUDAApi;
 
 (*
  * Copyright 1993-2020 NVIDIA Corporation.  All rights reserved.

+ 1 - 1
Source/Import.CUDAParallelPrimitives.pas → Source/Imports.CUDAParallelPrimitives.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.CUDAParallelPrimitives;
+unit Imports.CUDAParallelPrimitives;
 
 (* CUDA Parallel Primitives *)
 

+ 1 - 1
Source/Import.CUDAUtility.pas → Source/Imports.CUDAUtility.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.CUDAUtility;
+unit Imports.CUDAUtility;
 
 (* CUDA Utility Wraper of cutil *)
 

+ 46 - 46
Source/Import.cg.pas → Source/Imports.Cg.pas

@@ -1,52 +1,52 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-{
+(*
    Conversion of cg NVIDIA header files to cg.pas
-}
-{******************************************************************************}
-{*                                                                            *}
-{*  Copyright (c) 2002, NVIDIA Corporation.                                   *}
-{*                                                                            *}
-{*  Files:    cg.h, cg_datatypes.h, cg_errors.h, cg_profiles.h,               *}
-{*            cgGL_profiles.h, cg_bindlocations.h                             *}
-{*  Content:  NVIDIA Cg core include files                                    *}
-{*                                                                            *}
-{*  NVIDIA "Cg" Release 1.2 ObjectPascal adaptation by Alexey Barkovoy        *}
-{*  E-Mail: [email protected]                                                  *}
-{*                                                                            *}
-{*  Modified: 14-Mar-2004                                                     *}
-{*                                                                            *}
-{*  Latest version can be downloaded from:                                    *}
-{*     http://www.clootie.ru/                                                 *}
-{*       http://developer.nvidia.com/object/cg_download.html                  *}
-{*                                                                            *}
-{******************************************************************************}
-{                                                                              }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
-{                                                                              }
-{ The contents of this file are used with permission, subject to the Mozilla   }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at      }
-{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
-{                                                                              }
-{ Software distributed under the License is distributed on an "AS IS" basis,   }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License.    }
-{                                                                              }
-{ Alternatively, the contents of this file may be used under the terms of the  }
-{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
-{ provisions of the LGPL License are applicable instead of those above.        }
-{ If you wish to allow use of your version of this file only under the terms   }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting  the provisions above and  }
-{ replace  them with the notice and other provisions required by the LGPL      }
-{ License.  If you do not delete the provisions above, a recipient may use     }
-{ your version of this file under either the MPL or the LGPL License.          }
-{                                                                              }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{                                                                              }
-{******************************************************************************}
+*)
+(******************************************************************************
+ *                                                                            *
+ *  Copyright (c) 2002, NVIDIA Corporation.                                   *
+ *                                                                            *
+ *  Files:    cg.h, cg_datatypes.h, cg_errors.h, cg_profiles.h,               *
+ *            cgGL_profiles.h, cg_bindlocations.h                             *
+ *  Content:  NVIDIA Cg core include files                                    *
+ *                                                                            *
+ *  NVIDIA "Cg" Release 1.2 ObjectPascal adaptation by Alexey Barkovoy        *
+ *  E-Mail: [email protected]                                                  *
+ *                                                                            *
+ *  Modified: 14-Mar-2004                                                     *
+ *                                                                            *
+ *  Latest version can be downloaded from:                                    *
+ *     http://www.clootie.ru/                                                 *
+ *       http://developer.nvidia.com/object/cg_download.html                  *
+ *                                                                            *)
+(******************************************************************************
+
+ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)
+
+ The contents of this file are used with permission, subject to the Mozilla
+ Public License Version 1.1 (the "License"); you may not use this file except
+ in compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/MPL-1.1.html
+
+ Software distributed under the License is distributed on an "AS IS" basis,
+ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
+ the specific language governing rights and limitations under the License.
+
+ Alternatively, the contents of this file may be used under the terms of the
+ GNU Lesser General Public License (the  "LGPL License"), in which case the
+ provisions of the LGPL License are applicable instead of those above.
+ If you wish to allow use of your version of this file only under the terms
+ of the LGPL License and not to allow others to use your version of this file
+ under the MPL, indicate your decision by deleting  the provisions above and
+ replace  them with the notice and other provisions required by the LGPL
+ License.  If you do not delete the provisions above, a recipient may use
+ your version of this file under either the MPL or the LGPL License.
+
+ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
+
+******************************************************************************)
 
 (*
  * Copyright (c) 2002, NVIDIA Corporation.
@@ -88,7 +88,7 @@
  * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  *)
-unit Import.Cg;
+unit Imports.Cg;
 
 interface
 

+ 2 - 2
Source/Import.cgGL.pas → Source/Imports.CgGL.pas

@@ -85,7 +85,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *)
-unit Import.CgGL;
+unit Imports.CgGL;
 
 {$I GLScene.inc}
 
@@ -93,7 +93,7 @@ interface
 
 uses
   Winapi.Windows,
-  Import.Cg;
+  Imports.Cg;
 
 const
   {$IFDEF MSWINDOWS}

+ 2 - 3
Source/Import.FMOD.pas → Source/Imports.FMOD.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.FMOD;
+unit Imports.FMOD;
 
 (*============================================================================================== 
   FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.               
@@ -33,7 +32,7 @@ uses
 {$IFDEF MSWINDOWS}
   Winapi.Windows,
 {$ENDIF}
-  Import.FMODtypes;
+  Imports.FMODtypes;
 
 
  const

+ 5 - 6
Source/Import.FMODerrors.pas → Source/Imports.FMODerrors.pas

@@ -1,12 +1,11 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
+unit Imports.FMODerrors;
 
-unit Import.FMODerrors;
-
-(* =============================================================================================== 
-  FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.               
-  =============================================================================================== 
+(* ===============================================================================================
+  FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.
+  ===============================================================================================
 
   NOTE: For the demos to run you must have either fmod.dll (in Windows)
   or libfmod-3.75.so (in Linux) installed.
@@ -27,7 +26,7 @@ unit Import.FMODerrors;
 interface
 
 uses
-  Import.FMODtypes;
+  Imports.FMODtypes;
 
 (*
   Disable warning for unsafe types in Delphi 7

+ 5 - 6
Source/Import.FMODpresets.pas → Source/Imports.FMODpresets.pas

@@ -1,12 +1,11 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
+unit Imports.FMODpresets;
 
-unit Import.FMODpresets;
-
-(*=============================================================================================== 
-  FMOD presets header file. Copyright (c), FireLight Technologies Pty, Ltd. 1999-2004.            
-  =============================================================================================== 
+(*===============================================================================================
+  FMOD presets header file. Copyright (c), FireLight Technologies Pty, Ltd. 1999-2004.
+  ===============================================================================================
 
   NOTE: For the demos to run you must have either fmod.dll (in Windows)
   or libfmod-3.75.so (in Linux) installed.
@@ -27,7 +26,7 @@ unit Import.FMODpresets;
 interface
 
 uses
-  Import.FMODtypes;
+  Imports.FMODtypes;
 
 (*
 [DEFINE_START]

+ 1 - 2
Source/Import.FMODtypes.pas → Source/Imports.FMODtypes.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.FMODtypes;
+unit Imports.FMODtypes;
 
 (*=============================================================================================== 
   FMOD Types header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.              

+ 1 - 2
Source/Import.ModuleLoader.pas → Source/Imports.ModuleLoader.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.ModuleLoader;
+unit Imports.ModuleLoader;
 
 {******************************************************************}
 {                                                                  }

+ 1 - 2
Source/Import.NGD.pas → Source/Imports.NGD.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.NGD;
+unit Imports.NGD;
 
 (* Copyright (c) <2003-2014> <Julio Jerez, Newton Game Dynamics>
 *

+ 2 - 3
Source/Import.NGD_Joints.pas → Source/Imports.NGD_Joints.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.NGD_Joints;
+unit Imports.NGD_Joints;
 
 (******************************************************************************
                                                                                
@@ -33,7 +32,7 @@ interface
 
 uses
   System.Classes,
-  Import.NGD;
+  Imports.NGD;
 
 const
 {$IFDEF WIN32}

+ 1 - 1
Source/Import.Newton.pas → Source/Imports.Newton.pas

@@ -18,7 +18,7 @@
 *
 * 3. This notice may not be removed or altered from any source distribution.
 *)
-unit Import.Newton;
+unit Imports.Newton;
 
 // Define double to use newton in double precision
 {.$DEFINE USE_DOUBLE_PRECISION}

+ 2 - 3
Source/Import.ODE.pas → Source/Imports.ODE.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.ODE;
+unit Imports.ODE;
 
 (*************************************************************************
  *                                                                       *
@@ -56,7 +55,7 @@ interface
 
 uses
   System.Classes,
-  Import.ModuleLoader;
+  Imports.ModuleLoader;
 
 const
 

+ 1 - 1
Source/Import.OpenAL.pas → Source/Imports.OpenAL.pas

@@ -38,7 +38,7 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *)
 
-unit Import.OpenAL;
+unit Imports.OpenAL;
 
 interface
 

+ 2 - 2
Source/Import.OpenCL.pas → Source/Imports.OpenCL.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.OpenCL;
+unit Imports.OpenCL;
 
 (*
    Conversion of OpenCL cl.h header file into CL.pas
@@ -40,7 +40,7 @@ interface
 
 uses
   Winapi.Windows,
-  Import.OpenCL_Platform;
+  Imports.OpenCL_Platform;
 
 const
   {$IFDEF MSWINDOWS}

+ 3 - 3
Source/Import.OpenCL_GL.pas → Source/Imports.OpenCL_GL.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.OpenCL_GL;
+unit Imports.OpenCL_GL;
 
 (*
    Conversion of OpenCL header file: cl_gl.h to CL_GL.pas,
@@ -34,8 +34,8 @@ unit Import.OpenCL_GL;
 interface
 
 uses
-  Import.OpenCL,
-  Import.OpenCL_Platform;
+  Imports.OpenCL,
+  Imports.OpenCL_Platform;
 
 type
   PGLuint = ^Cardinal;

+ 1 - 1
Source/Import.OpenCL_Platform.pas → Source/Imports.OpenCL_Platform.pas

@@ -1,7 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-unit Import.OpenCL_Platform;
+unit Imports.OpenCL_Platform;
 
 (*
   Conversion of OpenCL header file: cl_platform.h to CL_Platform.pas,

+ 1 - 2
Source/Import.PhysX.pas → Source/Imports.PhysX.pas

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit Import.PhysX;
+unit Imports.PhysX;
 
 interface
 

+ 1 - 1
Source/Import.SDL2.pas → Source/Imports.SDL2.pas

@@ -1,4 +1,4 @@
-unit Import.SDL2;
+unit Imports.SDL2;
 {*******************************************************************************
 
   SDL2.pas        v1.0  29/07/2013 first version for DelphiXE

+ 3 - 3
Source/SDL2.Image.pas → Source/Imports.SDL2Image.pas

@@ -1,4 +1,4 @@
-unit SDL2.Image;
+unit Imports.SDL2Image;
 (*******************************************************************************
 
   SDL2_Image.pas  v1.0  29/07/2013 first version for DelphiXE
@@ -20,7 +20,7 @@
 interface
 
 uses
-  Import.SDL2;
+  Imports.SDL2;
 
 const
 
@@ -215,7 +215,7 @@ implementation
 
 //******************************************************************************
 
-procedure SDL_IMAGE_VERSION(var X: TSDL_Version);
+procedure SDL_IMAGE_VERSION(Out X: TSDL_Version);
 begin
      X.major := SDL_IMAGE_MAJOR_VERSION;
      X.minor := SDL_IMAGE_MINOR_VERSION;

+ 2 - 2
Source/SDL2.Mixer.pas → Source/Imports.SDL2Mixer.pas

@@ -1,4 +1,4 @@
-unit SDL2.Mixer;
+unit Imports.SDL2Mixer;
 (*******************************************************************************
 
   SDL2_Mixer.pas  v1.0  29/07/2013 first version for DelphiXE
@@ -20,7 +20,7 @@
 interface
 
 uses
-  SDL2;
+  Imports.SDL2;
 
 const
 

+ 2 - 2
Source/SDL2.Net.pas → Source/Imports.SDL2Net.pas

@@ -1,4 +1,4 @@
-unit SDL2.Net;
+unit Imports.SDL2Net;
 (*******************************************************************************
 
   SDL2_Net.pas    v1.0  29/07/2013 first version for DelphiXE
@@ -25,7 +25,7 @@ uses
 {$IFDEF MSWINDOWS}
   Winapi.Windows,
 {$ENDIF}
-  SDL2;
+  Imports.SDL2;
 
 const
 

+ 2 - 2
Source/SDL2.Ttf.pas → Source/Imports.SDL2Ttf.pas

@@ -1,4 +1,4 @@
-unit SDL2.Ttf;
+unit Imports.SDL2Ttf;
 (*******************************************************************************
 
   SDL2_Ttf.pas    v1.0  29/07/2013 first version for DelphiXE
@@ -26,7 +26,7 @@ uses
 {$IFDEF MSWINDOWS}
   Winapi.Windows,
 {$ENDIF}
-  SDL2;
+  Imports.SDL2;
 
 const
 

+ 3 - 3
Source/Physics.NGDManager.pas

@@ -20,8 +20,8 @@ uses
   System.Math, // Samevalue isZero to compare single
   System.Types,
 
-  Import.NGD,
-  Import.NGD_Joints,
+  Imports.NGD,
+  Imports.NGD_Joints,
 
   /// Import.Newton,    // new version
 
@@ -41,7 +41,7 @@ uses
   GLS.Color;
 
 type
-  NGDFloat = Import.NGD.dFloat;
+  NGDFloat = Imports.NGD.dFloat;
   PNGDFloat = ^NGDFloat;
 
   TGLNGDHeightField = record

+ 1 - 2
Source/Physics.NGDRagdoll.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit Physics.NGDRagdoll;
 
 (* The Ragdoll extension by using Newton Game Dynamics Engine (ODE) *)
@@ -14,7 +13,7 @@ uses
   GLS.VectorGeometry,
   GLS.VectorTypes,
   GLS.VectorFileObjects,
-  Import.NGD;
+  Imports.NGD;
 
 type
   TNewtonRagdoll = class

+ 1 - 1
Source/Physics.ODEManager.pas

@@ -36,7 +36,7 @@ uses
   GLS.TerrainRenderer,
   GLS.Graph,
 
-  Import.ODE,
+  Imports.ODE,
   Physics.ODEUtils;
 
 type

+ 1 - 2
Source/Physics.ODERagdoll.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit Physics.ODERagdoll;
 
 (* The extension of TGLRagdoll by using Open Dynamics Engine (ODE) *)
@@ -17,7 +16,7 @@ uses
   GLS.Texture,
   GLS.VectorFileObjects,
 
-  Import.ODE,
+  Imports.ODE,
   Physics.ODEUtils;
 
 const

+ 1 - 1
Source/Physics.ODESkeletonColliders.pas

@@ -13,7 +13,7 @@ uses
   GLS.PersistentClasses,
   GLS.VectorGeometry,
   GLS.VectorFileObjects,
-  Import.ODE;
+  Imports.ODE;
 
 type
 

+ 2 - 3
Source/Physics.ODEUtils.pas

@@ -1,10 +1,9 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit Physics.ODEUtils;
 
-(* Open Dynamic Engine Utils 
+(* Open Dynamic Engine Utils
 
    Here is the collection of random functions and procedures that useful when
    integrating ODE into GLScene. If you don't use GLS.Scene, this unit won't be
@@ -19,7 +18,7 @@ uses
   System.SysUtils,
   System.Classes,
 
-  Import.ODE,
+  Imports.ODE,
   GLS.OpenGLTokens,
   GLS.Context,
   GLS.VectorGeometry,

+ 0 - 1
Source/Physics.Register.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit Physics.Register;
 
 (* DesignTime registration code for the Physics Managers *)

+ 0 - 316
Source/SDL.Context.pas

@@ -1,316 +0,0 @@
-//
-// The graphics rendering engine GLScene http://glscene.org
-//
-
-unit SDL.Context;
-
-(*
-   SDL specific Context and Viewer.
-   NOTA: SDL notifies use of context destruction *after* it happened, this prevents
-         clean release of allocated stuff and requires a temporary switch to
-         "ignore OpenGL errors" mode during destruction, thus potentially
-         leaking memory (depending on hardware drivers willingness to perform
-         automatic releases)
-*)
-
-interface
-
-uses
-  Winapi.Windows,
-  System.Classes,
-  System.SysUtils,
-
-  GLS.OpenGLTokens,
-  GLS.OpenGLAdapter,
-  GLS.XOpenGL,
-  GLS.Context,
-  GLS.Scene,
-
-  SDL.Window,
-  Import.SDL2;
-
-type
-  (* A viewer using SDL.
-     Beware: only one at a time, no other viewers allowed!
-     Will also close the application when the window is closed! *)
-  TSDLViewer = class(TGLNonVisualViewer)
-  private
-    FCaption: string;
-    FOnSDLEvent: TSDLEvent;
-    FOnEventPollDone: TNotifyEvent;
-    FOnResize: TNotifyEvent;
-  protected
-    procedure SetCaption(const val: string);
-    procedure DoOnOpen(sender: TObject);
-    procedure DoOnClose(sender: TObject);
-    procedure DoOnResize(sender: TObject);
-    procedure DoOnSDLEvent(sender: TObject; const event: TSDL_Event);
-    procedure DoOnEventPollDone(sender: TObject);
-    procedure DoBufferStructuralChange(Sender: TObject); override;
-    procedure PrepareGLContext; override;
-  public
-    constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
-    procedure Render(baseObject: TGLBaseSceneObject = nil); override;
-    function Active: Boolean;
-  published
-    property Caption: string read FCaption write SetCaption;
-    property OnResize: TNotifyEvent read FOnResize write FOnResize;
-    (* Fired whenever an SDL Event is polled.
-     SDL_QUITEV and SDL_VIDEORESIZE are not passed to this event handler,
-     they are passed via OnClose and OnResize respectively. *)
-    property OnSDLEvent: TSDLEvent read FOnSDLEvent write FOnSDLEvent;
-    // Fired whenever an event polling completes with no events left to poll.
-    property OnEventPollDone: TNotifyEvent read FOnEventPollDone write FOnEventPollDone;
-  end;
-
-  (* A context driver for OpenGL via SDL (libsdl.org).
-     Due to limitations of SDL:
-     you may have only one SDL window opened at any time (you cannot have memory viewers)
-     closing the SDL window will terminate the application   *)
-  TSDLContext = class(TGLScreenControlingContext)
-  private
-    FSDLWin: TSDLWindow;
-    FSimulatedValidity: Boolean; // Hack around SDL's post-notified destruction of context
-  protected
-    procedure DoCreateContext(outputDevice: HDC); override;
-    procedure DoCreateMemoryContext(outputDevice: HWND; width, height: Integer; BufferCount: integer); override;
-    function DoShareLists(aContext: TGLContext): Boolean; override;
-    procedure DoDestroyContext; override;
-    procedure DoActivate; override;
-    procedure DoDeactivate; override;
-  public
-    constructor Create; override;
-    destructor Destroy; override;
-    function IsValid: Boolean; override;
-    procedure SwapBuffers; override;
-    function RenderOutputDevice: Pointer; override;
-    property SDLWindow: TSDLWindow read FSDLWin;
-  end;
-
-procedure Register;
-
-// ------------------------------------------------------------------
-implementation
-// ------------------------------------------------------------------
-
-// ------------------
-// ------------------ TSDLViewer ------------------
-// ------------------
-
-constructor TSDLViewer.Create(AOwner: TComponent);
-begin
-  inherited Create(AOwner);
-  Width := 640;
-  Height := 480;
-end;
-
-destructor TSDLViewer.Destroy;
-begin
-  inherited Destroy;
-end;
-
-procedure TSDLViewer.DoBufferStructuralChange(Sender: TObject);
-begin
-  // ignore that, supporting it with SDL is not very praticable as of now...
-end;
-
-procedure TSDLViewer.PrepareGLContext;
-begin
-  with Buffer.RenderingContext as TSDLContext do
-  begin
-    Width := Self.Width;
-    Height := Self.Height;
-    with FSDLWin do
-    begin
-      Caption := Self.Caption;
-      OnOpen := DoOnOpen;
-      OnClose := DoOnClose;
-      OnResize := DoOnResize;
-      OnSDLEvent := DoOnSDLEvent;
-      OnEventPollDone := DoOnEventPollDone;
-    end;
-  end;
-end;
-
-procedure TSDLViewer.Render(baseObject: TGLBaseSceneObject = nil);
-begin
-  LoadOpenGL;
-  if Buffer.RenderingContext = nil then
-  begin
-    Buffer.CreateRC(0, False);
-  end;
-  Buffer.Render(baseObject);
-end;
-
-function TSDLViewer.Active: Boolean;
-begin
-  Result := Assigned(Buffer.RenderingContext) and Buffer.RenderingContext.IsValid;
-end;
-
-procedure TSDLViewer.SetCaption(const val: string);
-begin
-  if val <> FCaption then
-  begin
-    FCaption := val;
-    if Buffer.RenderingContext <> nil then
-      with Buffer.RenderingContext as TSDLContext do
-        if Assigned(FSDLWin) then
-          FSDLWin.Caption := FCaption;
-  end;
-end;
-
-procedure TSDLViewer.DoOnOpen(sender: TObject);
-begin
-  // nothing yet
-end;
-
-procedure TSDLViewer.DoOnClose(sender: TObject);
-begin
-  // nothing yet
-end;
-
-procedure TSDLViewer.DoOnResize(sender: TObject);
-begin
-  with Buffer.RenderingContext as TSDLContext do
-  begin
-    Self.Width := FSDLWin.Width;
-    Self.Height := FSDLWin.Height;
-    Buffer.Resize(0, 0, FSDLWin.Width, FSDLWin.Height);
-  end;
-  if Assigned(FOnResize) then
-    FOnResize(Self);
-end;
-
-procedure TSDLViewer.DoOnSDLEvent(sender: TObject; const event: TSDL_Event);
-begin
-  if Assigned(FOnSDLEvent) then
-    FOnSDLEvent(sender, event);
-end;
-
-procedure TSDLViewer.DoOnEventPollDone(sender: TObject);
-begin
-  if Assigned(FOnEventPollDone) then
-    FOnEventPollDone(sender);
-end;
-
-// ------------------
-// ------------------ TSDLContext ------------------
-// ------------------
-
-constructor TSDLContext.Create;
-begin
-  inherited Create;
-  FSDLWin := TSDLWindow.Create(nil);
-end;
-
-destructor TSDLContext.Destroy;
-var
-  oldIgnore: Boolean;
-begin
-  oldIgnore := vIgnoreOpenGLErrors;
-  FSimulatedValidity := True;
-  vIgnoreOpenGLErrors := True;
-  try
-    inherited Destroy;
-  finally
-    vIgnoreOpenGLErrors := oldIgnore;
-    FSimulatedValidity := False;
-  end;
-  FreeAndNil(FSDLWin);
-end;
-
-procedure TSDLContext.DoCreateContext(outputDevice: HDC);
-var
-  sdlOpt: TSDLWindowOptions;
-begin
-  // Just in case it didn't happen already.
-  if not InitOpenGL then
-    RaiseLastOSError;
-
-  FSDLWin.Width := Width;
-  FSDLWin.Height := Height;
-  if ColorBits > 16 then
-    FSDLWin.PixelDepth := vpd24bits
-  else
-    FSDLWin.PixelDepth := vpd16bits;
-
-  sdlOpt := [voOpenGL, voHardwareAccel];
-  if FullScreen then
-    sdlOpt := sdlOpt + [voFullScreen]
-  else
-    sdlOpt := sdlOpt + [voResizable];
-  if rcoDoubleBuffered in Options then
-    sdlOpt := sdlOpt + [voDoubleBuffer];
-  if StencilBits > 0 then
-    sdlOpt := sdlOpt + [voStencilBuffer];
-
-  FSDLWin.Open;
-  if not FSDLWin.Active then
-    raise Exception.Create('SDLWindow open failed.');
-
-  FGL.Initialize;
-  MakeGLCurrent;
-end;
-
-procedure TSDLContext.DoCreateMemoryContext(outputDevice: HWND; width, height: Integer; BufferCount: integer);
-begin
-  raise Exception.Create(ClassName + ': Memory contexts not supported');
-end;
-
-function TSDLContext.DoShareLists(aContext: TGLContext): Boolean;
-begin
-  // nothing (only one context at all times... no need to share)
-  Result := False;
-end;
-
-procedure TSDLContext.DoDestroyContext;
-begin
-  // Beware, SDL will also terminate the application
-  FGL.Close;
-  FSDLWin.Close;
-end;
-
-procedure TSDLContext.DoActivate;
-begin
-  if not FGL.IsInitialized then
-    FGL.Initialize;
-end;
-
-procedure TSDLContext.DoDeactivate;
-begin
-  // nothing particular (only one context, always active)
-end;
-
-function TSDLContext.IsValid: Boolean;
-begin
-  Result := (Assigned(FSDLWin) and (FSDLWin.Active)) or FSimulatedValidity;
-end;
-
-procedure TSDLContext.SwapBuffers;
-begin
-  FSDLWin.SwapBuffers;
-end;
-
-function TSDLContext.RenderOutputDevice: Pointer;
-begin
-  // unsupported
-  Result := nil;
-end;
-
-
-procedure Register;
-begin
-  RegisterComponents('GLScene', [TSDLViewer]);
-end;
-
-
-// ------------------------------------------------------------------
-initialization
-// ------------------------------------------------------------------
-
-  RegisterClass(TSDLViewer);
-  RegisterGLContextClass(TSDLContext);
-
-end.
-

+ 0 - 587
Source/SDL.Window.pas

@@ -1,587 +0,0 @@
-//
-// The graphics rendering engine GLScene http://glscene.org
-//
-
-unit SDL.Window;
-
-(*
-  Non visual wrapper around basic SDL window features.
-  Notes:
-  Unit must ultimately *NOT* make use of any platform specific stuff,
-  *EVEN* through the use of conditionals.
-  SDL-specifics should also be avoided in the "interface" section.
-  This component uses a header conversion for SDL from http://libsdl.org
-*)
-
-interface
-
-{$I GLScene.inc}
-
-uses
-  System.Classes,
-  System.SysUtils,
-  System.SyncObjs,
-
-  GLS.OpenGLTokens,
-  GLS.OpenGLAdapter,
-  GLS.VectorTypes,
-  GLS.State,
-  GLS.Context,
-  GLS.VectorGeometry,
-  Import.SDL2;
-
-type
-  (* Pixel Depth options.
-    vpd16bits: 16bpp graphics (565) (and 16 bits depth buffer for OpenGL)
-    vpd24bits: 24bpp graphics (565) (and 24 bits depth buffer for OpenGL) *)
-  TSDLWindowPixelDepth = (vpd16bits, vpd24bits);
-
-  (* Specifies optional settings for the SDL window.
-    Those options are a simplified subset of the SDL options:
-    voDoubleBuffer: create a double-buffered window
-    voOpenGL: requires OpenGL capability for the window
-    voResizable: window should be resizable
-    voFullScreen: requires a full screen "window" (screen resolution may be changed)
-    voStencilBuffer: requires a stencil buffer (8bits, use along voOpenGL) *)
-  TSDLWindowOption = (voDoubleBuffer, voHardwareAccel, voOpenGL, voResizable, 
-    voFullScreen,  voStencilBuffer);
-  TSDLWindowOptions = set of TSDLWindowOption;
-  TSDLEvent = procedure(sender: TObject; const event: TSDL_Event) of object;
-
-const
-  cDefaultSDLWindowOptions = [voDoubleBuffer, voHardwareAccel, voOpenGL, voResizable];
-
-type
-  (* A basic SDL-based window (non-visual component).
-    Only a limited subset of SDL's features are available, and this window
-    is heavily oriented toward using it for OpenGL rendering.
-    Be aware SDL is currently limited to a single window at any time...
-    so you may have multiple components, but only one can be used *)
-  TSDLWindow = class(TComponent)
-  private
-    FWidth: Integer;
-    FHeight: Integer;
-    FPixelDepth: TSDLWindowPixelDepth;
-    FOptions: TSDLWindowOptions;
-    FActive: Boolean;
-    FOnOpen: TNotifyEvent;
-    FOnClose: TNotifyEvent;
-    FOnResize: TNotifyEvent;
-    FOnSDLEvent: TSDLEvent;
-    FOnEventPollDone: TNotifyEvent;
-    FCaption: String;
-    FThreadSleepLength: Integer;
-    FThreadPriority: TThreadPriority;
-    FThreadedEventPolling: Boolean;
-    FThread: TThread;
-    FSDLSurface: PSDL_Surface;
-    FWindowHandle: Longword;
-    FSDLWindow: PSDL_Window;
-  protected
-    procedure SetWidth(const val: Integer);
-    procedure SetHeight(const val: Integer);
-    procedure SetPixelDepth(const val: TSDLWindowPixelDepth);
-    procedure SetOptions(const val: TSDLWindowOptions);
-    procedure SetActive(const val: Boolean);
-    procedure SetCaption(const val: String);
-    procedure SetThreadSleepLength(const val: Integer);
-    procedure SetThreadPriority(const val: TThreadPriority);
-    procedure SetThreadedEventPolling(const val: Boolean);
-    function BuildSDLVideoFlags: Cardinal;
-    procedure SetSDLGLAttributes;
-    procedure CreateOrRecreateSDLSurface;
-    procedure ResizeGLWindow;
-    procedure SetupSDLEnvironmentValues;
-    procedure StartThread;
-    procedure StopThread;
-  public
-    constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
-    // Initializes and Opens an SDL window
-    procedure Open;
-    (* Closes an already opened SDL Window.
-      NOTE: will also kill the app due to an SDL limitation... *)
-    procedure Close;
-    // Applies changes (size, pixeldepth...) to the opened window
-    procedure UpdateWindow;
-    // Swap front and back buffer
-    procedure SwapBuffers;
-    (* Polls SDL events.
-      SDL events can be either polled "manually", through a call to this
-      method, or automatically via ThreadEventPolling *)
-    procedure PollEvents;
-    (* Is the SDL window active (opened)?
-      Adjusting this value as the same effect as invoking Open/Close *)
-    property Active: Boolean read FActive write SetActive;
-    (* Presents the SDL surface of the window.
-      If Active is False, this value is undefined *)
-    property SDLSurface: PSDL_Surface read FSDLSurface;
-    // Experimental: ask SDL to reuse and existing WindowHandle
-    property WindowHandle: Cardinal read FWindowHandle write FWindowHandle;
-    // Presents the SDL window. If Active is False, this value is undefined
-    property SDLWindow: PSDL_Window read FSDLWindow;
-  published
-    // Width of the SDL window. To apply changes to an active window, call UpdateWindow
-    property Width: Integer read FWidth write SetWidth default 640;
-    // Height of the SDL window. To apply changes to an active window, call UpdateWindow
-    property Height: Integer read FHeight write SetHeight default 480;
-    // PixelDepth of the SDL window. To apply changes to an active window, call UpdateWindow
-    property PixelDepth: TSDLWindowPixelDepth read FPixelDepth
-      write SetPixelDepth default vpd24bits;
-    // Options for the SDL window. To apply changes to an active window, call UpdateWindow
-    property Options: TSDLWindowOptions read FOptions write SetOptions
-      default cDefaultSDLWindowOptions;
-    // Caption of the SDL window
-    property Caption: String read FCaption write SetCaption;
-    // Controls automatic threaded event polling
-    property ThreadedEventPolling: Boolean read FThreadedEventPolling
-      write SetThreadedEventPolling default True;
-    // Sleep length between pollings in the polling thread
-    property ThreadSleepLength: Integer read FThreadSleepLength
-      write SetThreadSleepLength default 1;
-    // Priority of the event polling thread
-    property ThreadPriority: TThreadPriority read FThreadPriority
-      write SetThreadPriority default tpLower;
-    // Fired whenever Open succeeds. The SDL surface is defined and usable when the event happens
-    property OnOpen: TNotifyEvent read FOnOpen write FOnOpen;
-    // Fired whenever closing the window. The SDL surface is still defined and usable when the event happens
-    property OnClose: TNotifyEvent read FOnClose write FOnClose;
-    // Fired whenever the window is resized. Note: glViewPort call is handled automatically for OpenGL windows
-    property OnResize: TNotifyEvent read FOnResize write FOnResize;
-    (* Fired whenever an SDL Event is polled.
-      SDL_QUITEV and SDL_VIDEORESIZE are not passed to this event handler,
-      they are passed via OnClose and OnResize respectively *)
-    property OnSDLEvent: TSDLEvent read FOnSDLEvent write FOnSDLEvent;
-    // Fired whenever an event polling completes with no events left to poll
-    property OnEventPollDone: TNotifyEvent read FOnEventPollDone
-      write FOnEventPollDone;
-  end;
-
-// Generic SDL or SDLWindow exception
-ESDLError = class(Exception);
-
-// -----------------------------------------------------------------------------
-// Get Environment Routines
-//------------------------------------------------------------------------------
-
-function _putenv(const variable: PAnsiChar): Integer; cdecl;
-
-(* Put a variable of the form "name=value" into the environment *)
-/// function SDL_putenv(const variable: PAnsiChar): integer; cdecl; external LibName;
-function SDL_putenv(const variable: PAnsiChar): Integer;
-
-(* The following function has been commented out to encourage developers to use
-  SDL_putenv as it more portable *)
-/// function putenv(const variable: PAnsiChar): integer;
-
-function getenv(const name: PAnsiChar): PAnsiChar; cdecl;
-
-{ * Retrieve a variable named "name" from the environment }
-/// function SDL_getenv(const name: PAnsiChar): PAnsiChar; cdecl; external LibName;
-function SDL_getenv(const name: PAnsiChar): PAnsiChar;
-
-(* The following function has been commented out to encourage developers to use
-  SDL_getenv as it it more portable *)
-/// function getenv(const name: PAnsiChar): PAnsiChar;
-
-procedure Register;
-
-// ---------------------------------------------------------------------
-implementation
-// ---------------------------------------------------------------------
-
-var
-  vSDLCS: TCriticalSection;
-  vSDLActive: Boolean; // will be removed once SDL supports multiple windows
-
-type
-  TSDLEventThread = class(TThread)
-    Owner: TSDLWindow;
-    procedure Execute; override;
-    procedure DoPollEvents;
-  end;
-
-procedure RaiseSDLError(const msg: String = '');
-begin
-  if msg <> '' then
-    raise ESDLError.Create(msg + #13#10 + SDL_GetError)
-  else
-    raise ESDLError.Create(SDL_GetError);
-end;
-
-function _putenv(const variable: PAnsiChar): Integer; cdecl; external 'MSVCRT.DLL';
-
-function SDL_putenv(const variable: PAnsiChar): Integer;
-begin
-  Result := _putenv(variable);
-end;
-
-function getenv(const name: PAnsiChar): PAnsiChar; cdecl; external 'MSVCRT.DLL';
-
-function SDL_getenv(const name: PAnsiChar): PAnsiChar;
-begin
-  Result := getenv(name);
-end;
-
-// ------------------
-// ------------------ TSDLEventThread ------------------
-// ------------------
-
-procedure TSDLEventThread.Execute;
-begin
-  try
-    while not Terminated do
-    begin
-      vSDLCS.Enter;
-      try
-        SDL_Delay(Owner.ThreadSleepLength);
-      finally
-        vSDLCS.Leave;
-      end;
-      Synchronize(DoPollEvents);
-    end;
-  except
-    // bail out asap, problem wasn't here anyway
-  end;
-  vSDLCS.Enter;
-  try
-    if Assigned(Owner) then
-      Owner.FThread := nil;
-  finally
-    vSDLCS.Leave;
-  end;
-end;
-
-procedure TSDLEventThread.DoPollEvents;
-begin
-  // no need for a CS here, we're in the main thread
-  if Assigned(Owner) then
-    Owner.PollEvents;
-end;
-
-// ------------------
-// ------------------ TSDLWindow ------------------
-// ------------------
-
-constructor TSDLWindow.Create(AOwner: TComponent);
-begin
-  inherited Create(AOwner);
-  FWidth := 640;
-  FHeight := 480;
-  FPixelDepth := vpd24bits;
-  FThreadedEventPolling := True;
-  FThreadSleepLength := 1;
-  FThreadPriority := tpLower;
-  FOptions := cDefaultSDLWindowOptions;
-end;
-
-destructor TSDLWindow.Destroy;
-begin
-  Close;
-  inherited Destroy;
-end;
-
-procedure TSDLWindow.SetWidth(const val: Integer);
-begin
-  if FWidth <> val then
-    if val > 0 then
-      FWidth := val;
-end;
-
-procedure TSDLWindow.SetHeight(const val: Integer);
-begin
-  if FHeight <> val then
-    if val > 0 then
-      FHeight := val;
-end;
-
-procedure TSDLWindow.SetPixelDepth(const val: TSDLWindowPixelDepth);
-begin
-  FPixelDepth := val;
-end;
-
-procedure TSDLWindow.SetOptions(const val: TSDLWindowOptions);
-begin
-  FOptions := val;
-end;
-
-function TSDLWindow.BuildSDLVideoFlags: Cardinal;
-var
-  videoInfo: PSDL_RendererInfo;
-begin
-  SDL_GetRendererInfo(Self, videoInfo);
-
-  if not Assigned(videoInfo) then
-    raise ESDLError.Create('Video query failed.');
-  Result := 0;
-  if voOpenGL in Options then
-    Result := Result + SDL_WINDOW_OPENGL;
-  if voDoubleBuffer in Options then
-    Result := Result + SDL_GL_DOUBLEBUFFER;
-  if voResizable in Options then
-    Result := Result + SDL_WINDOW_RESIZABLE;
-  if voFullScreen in Options then
-    Result := Result + SDL_WINDOW_FULLSCREEN;
-  if voStencilBuffer in Options then
-    Result := Result + SDL_SWSURFACE; // for compatibility with SDL 1.2 only!
-end;
-
-procedure TSDLWindow.SetSDLGLAttributes;
-begin
-  case PixelDepth of
-    vpd16bits:
-      begin
-        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
-        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
-        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
-        SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
-      end;
-    vpd24bits:
-      begin
-        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
-        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
-        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
-        SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
-      end;
-  else
-    Assert(False);
-  end;
-  if voStencilBuffer in Options then
-    SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8)
-  else
-    SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0);
-  if voDoubleBuffer in Options then
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1)
-  else
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0)
-end;
-
-procedure TSDLWindow.CreateOrRecreateSDLSurface;
-const
-  cPixelDepthToBpp: array [Low(TSDLWindowPixelDepth)
-    .. High(TSDLWindowPixelDepth)] of Integer = (16, 24);
-var
-  videoFlags: Integer;
-begin
-  videoFlags := BuildSDLVideoFlags;
-  if voOpenGL in Options then
-    SetSDLGLAttributes;
-
-  {
-    SDL_WM_SetCaption(PAnsiChar(AnsiString(FCaption)), nil);
-    FSDLSurface := SDL_SetVideoMode(Width, Height, cPixelDepthToBpp[PixelDepth], videoFlags);
-  }
-
-  FSDLWindow := SDL_CreateWindow(PChar(AnsiString(FCaption)),
-    SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, Width, Height,
-    videoFlags);
-  if not Assigned(FSDLSurface) then
-    RaiseSDLError('Unable to create surface.');
-
-  if voOpenGL in Options then
-    ResizeGLWindow;
-end;
-
-procedure TSDLWindow.SetupSDLEnvironmentValues;
-var
-  envVal: String;
-begin
-  if FWindowHandle <> 0 then
-  begin
-    envVal := '';
-
-    SDL_putenv('SDL_VIDEODRIVER=windib');
-    envVal := 'SDL_WINDOWID=' + IntToStr(Integer(FWindowHandle));
-
-    SDL_putenv(PAnsiChar(AnsiString(envVal)));
-  end;
-end;
-
-procedure TSDLWindow.Open;
-begin
-  if Active then
-    Exit;
-  if vSDLActive then
-    raise ESDLError.Create('Only one SDL window can be opened at a time...')
-  else
-    vSDLActive := True;
-
-  if SDL_Init(SDL_INIT_VIDEO) < 0 then
-    raise ESDLError.Create('Could not initialize SDL.');
-  if voOpenGL in Options then
-    InitOpenGL;
-  SetupSDLEnvironmentValues;
-  CreateOrRecreateSDLSurface;
-  FActive := True;
-  if Assigned(FOnOpen) then
-    FOnOpen(Self);
-  if Assigned(FOnResize) then
-    FOnResize(Self);
-  if ThreadedEventPolling then
-    StartThread;
-end;
-
-procedure TSDLWindow.Close;
-begin
-  if not Active then
-    Exit;
-  if Assigned(FOnClose) then
-    FOnClose(Self);
-  FActive := False;
-  StopThread;
-  SDL_Quit; // SubSystem(SDL_INIT_VIDEO);
-  FSDLSurface := nil;
-  vSDLActive := False;
-end;
-
-procedure TSDLWindow.UpdateWindow;
-begin
-  if Active then
-    CreateOrRecreateSDLSurface;
-end;
-
-procedure TSDLWindow.SwapBuffers;
-begin
-  if Active then
-    if voOpenGL in Options then
-      SDL_GL_SwapWindow(SDLWindow)
-    else
-      SDL_RenderPresent(SDLWindow);
-end;
-
-procedure TSDLWindow.ResizeGLWindow;
-var
-  RC: TGLContext;
-begin
-  RC := CurrentGLContext;
-  if Assigned(RC) then
-    RC.GLStates.ViewPort := Vector4iMake(0, 0, Width, Height);
-end;
-
-procedure TSDLWindow.SetActive(const val: Boolean);
-begin
-  if val <> FActive then
-    if val then
-      Open
-    else
-      Close;
-end;
-
-procedure TSDLWindow.SetCaption(const val: String);
-begin
-  if FCaption <> val then
-  begin
-    FCaption := val;
-    if Active then
-      SDL_SetWindowTitle(nil, PChar(AnsiString(FCaption)));
-  end;
-end;
-
-procedure TSDLWindow.SetThreadSleepLength(const val: Integer);
-begin
-  if val >= 0 then
-    FThreadSleepLength := val;
-end;
-
-procedure TSDLWindow.SetThreadPriority(const val: TThreadPriority);
-begin
-  FThreadPriority := val;
-  if Assigned(FThread) then
-    FThread.Priority := val;
-end;
-
-procedure TSDLWindow.SetThreadedEventPolling(const val: Boolean);
-begin
-  if FThreadedEventPolling <> val then
-  begin
-    FThreadedEventPolling := val;
-    if ThreadedEventPolling then
-    begin
-      if Active and (not Assigned(FThread)) then
-        StartThread;
-    end
-    else if Assigned(FThread) then
-      StopThread;
-  end;
-end;
-
-procedure TSDLWindow.StartThread;
-begin
-  if Active and ThreadedEventPolling and (not Assigned(FThread)) then
-  begin
-    FThread := TSDLEventThread.Create(True);
-    TSDLEventThread(FThread).Owner := Self;
-    FThread.Priority := ThreadPriority;
-    FThread.FreeOnTerminate := True;
-    FThread.Resume;
-  end;
-end;
-
-procedure TSDLWindow.StopThread;
-begin
-  if Assigned(FThread) then
-  begin
-    vSDLCS.Enter;
-    try
-      TSDLEventThread(FThread).Owner := nil;
-      FThread.Terminate;
-    finally
-      vSDLCS.Leave;
-    end;
-  end;
-end;
-
-procedure TSDLWindow.PollEvents;
-var
-  event: TSDL_Event;
-begin
-  if Active then
-  begin
-    while SDL_PollEvent(@event) > 0 do
-    begin
-      case event.type_ of
-        SDL_QUITEV:
-          begin
-            Close;
-            Break;
-          end;
-        SDL_WINDOWEVENT_RESIZED:
-          begin
-            FWidth := event.window.data1; // resize.w
-            FHeight := event.window.data2; // resize.h
-            if voOpenGL in Options then
-              ResizeGLWindow
-            else
-            begin
-              CreateOrRecreateSDLSurface;
-              if not Assigned(FSDLSurface) then
-                RaiseSDLError('Could not get a surface after resize.');
-            end;
-            if Assigned(FOnResize) then
-              FOnResize(Self);
-          end;
-      else
-        if Assigned(FOnSDLEvent) then
-          FOnSDLEvent(Self, event);
-      end;
-    end;
-    if Active then
-      if Assigned(FOnEventPollDone) then
-        FOnEventPollDone(Self);
-  end;
-end;
-
-procedure Register;
-begin
-  RegisterComponents('GLScene Utils', [TSDLWindow]);
-end;
-
-// ---------------------------------------------------------------------
-initialization
-// ---------------------------------------------------------------------
-
-// We DON'T free this stuff manually, automatic release will take care of this
-vSDLCS := TCriticalSection.Create;
-
-end.
-

+ 1 - 1
Source/Sounds.BASS.pas

@@ -24,7 +24,7 @@ uses
   GLS.VectorTypes,
   GLS.VectorGeometry,
 
-  Import.BASS;
+  Imports.BASS;
 
 type
   TBASS3DAlgorithm = (algDefault, algOff, algFull, algLight);

+ 3 - 3
Source/Sounds.FMOD.pas

@@ -24,9 +24,9 @@ uses
   GLS.VectorTypes,
   GLS.VectorGeometry,
 
-  Import.FMOD,
-  Import.FMODTypes,
-  Import.FMODPresets;
+  Imports.FMOD,
+  Imports.FMODTypes,
+  Imports.FMODPresets;
 
 type
 

+ 1 - 1
Source/Sounds.OpenAL.pas

@@ -64,7 +64,7 @@ implementation
 // ---------------------------------------------------------------------
 
 uses
-  Import.OpenAL {al, alut, alTypes};
+  Imports.OpenAL {al, alut, alTypes};
 
 // checks for an error and raises an exception if necessary
 procedure CheckOpenALError;