Browse Source

Added Sounds. before corresponding units

GLScene 4 years ago
parent
commit
d9b24d37a9

+ 1 - 1
AdvDemos/CPP/Christmas/Unit1.cpp

@@ -24,7 +24,7 @@
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.WindowsFont"
 #pragma link "GLS.WindowsFont"
 #pragma link "GLS.ScreenSaver"
 #pragma link "GLS.ScreenSaver"
-#pragma link "GLSM.BASS"
+#pragma link "Sounds.BASS"
 #pragma link "GLS.File3DS"
 #pragma link "GLS.File3DS"
 #pragma link "GLS.FileWAV"
 #pragma link "GLS.FileWAV"
 #pragma link "GLS.ScreenSaver"
 #pragma link "GLS.ScreenSaver"

+ 1 - 1
AdvDemos/CPP/Christmas/Unit1.h

@@ -28,7 +28,7 @@
 #include "GLS.SceneViewer.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.WindowsFont.hpp"
 #include "GLS.WindowsFont.hpp"
 #include "GLS.ScreenSaver.hpp"
 #include "GLS.ScreenSaver.hpp"
-#include "GLSM.BASS.hpp"
+#include "Sounds.BASS.hpp"
 #include "GLS.FileWAV.hpp"
 #include "GLS.FileWAV.hpp"
 #include "Jpeg.hpp"
 #include "Jpeg.hpp"
 #include "Import.Bass.hpp"
 #include "Import.Bass.hpp"

+ 1 - 1
AdvDemos/Delphi/Christmas/FMain.pas

@@ -40,7 +40,7 @@ uses
   GLS.Coordinates,
   GLS.Coordinates,
   GLS.Color,
   GLS.Color,
   GLS.Sound,
   GLS.Sound,
-  GLSM.BASS,
+  Sounds.BASS,
   Import.BASS,
   Import.BASS,
   GLS.FireFX,
   GLS.FireFX,
   GLS.FileWAV;
   GLS.FileWAV;

+ 1 - 1
Demos/CPP/meshes/terrain/Unit1.cpp

@@ -12,7 +12,7 @@
 #pragma package(smart_init)
 #pragma package(smart_init)
 #pragma link "GLS.LensFlare"
 #pragma link "GLS.LensFlare"
 #pragma link "GLS.VectorGeometry"
 #pragma link "GLS.VectorGeometry"
-#pragma link "GLSM.BASS"
+#pragma link "Sounds.BASS"
 #pragma link "GLS.Sound"
 #pragma link "GLS.Sound"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.SkyDome"
 #pragma link "GLS.SkyDome"

+ 1 - 1
Demos/CPP/meshes/terrain/Unit1.h

@@ -13,7 +13,7 @@
 
 
 #include "GLS.LensFlare.hpp"
 #include "GLS.LensFlare.hpp"
 #include "GLS.VectorGeometry.hpp"
 #include "GLS.VectorGeometry.hpp"
-#include "GLSM.BASS.hpp"
+#include "Sounds.BASS.hpp"
 #include "GLS.Sound.hpp"
 #include "GLS.Sound.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.SkyDome.hpp"
 #include "GLS.SkyDome.hpp"

+ 3 - 3
Demos/CPP/sound/3Dsound/Unit1.cpp

@@ -13,9 +13,9 @@
 #pragma link "GLS.GeomObjects"
 #pragma link "GLS.GeomObjects"
 #pragma link "GLS.Objects"
 #pragma link "GLS.Objects"
 #pragma link "GLS.Scene"
 #pragma link "GLS.Scene"
-#pragma link "GLSMBASS"
-#pragma link "GLSMFMOD"
-#pragma link "GLSMOpenAL"
+#pragma link "Sounds.BASS"
+#pragma link "Sounds.FMOD"
+#pragma link "Sounds.OpenAL"
 #pragma link "GLS.Sound"
 #pragma link "GLS.Sound"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.FileWAV"
 #pragma link "GLS.FileWAV"

+ 21 - 13
Demos/CPP/sound/3Dsound/Unit1.dfm

@@ -2,8 +2,8 @@ object Form1: TForm1
   Left = 0
   Left = 0
   Top = 0
   Top = 0
   Caption = 'Sound Around'
   Caption = 'Sound Around'
-  ClientHeight = 370
-  ClientWidth = 514
+  ClientHeight = 433
+  ClientWidth = 605
   Color = clBtnFace
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
   Font.Color = clWindowText
@@ -12,28 +12,30 @@ object Form1: TForm1
   Font.Style = []
   Font.Style = []
   OldCreateOrder = False
   OldCreateOrder = False
   Position = poScreenCenter
   Position = poScreenCenter
-  WindowState = wsMaximized
   OnCreate = FormCreate
   OnCreate = FormCreate
   PixelsPerInch = 96
   PixelsPerInch = 96
   TextHeight = 13
   TextHeight = 13
   object GLSceneViewer: TGLSceneViewer
   object GLSceneViewer: TGLSceneViewer
     Left = 0
     Left = 0
     Top = 73
     Top = 73
-    Width = 514
-    Height = 270
+    Width = 605
+    Height = 333
     Camera = GLCamera1
     Camera = GLCamera1
     Buffer.BackgroundColor = clBlack
     Buffer.BackgroundColor = clBlack
     Buffer.AntiAliasing = aaNone
     Buffer.AntiAliasing = aaNone
-    FieldOfView = 139.353729248046900000
+    FieldOfView = 146.569946289062500000
+    PenAsTouch = False
     Align = alClient
     Align = alClient
     OnMouseDown = GLSceneViewerMouseDown
     OnMouseDown = GLSceneViewerMouseDown
     OnMouseMove = GLSceneViewerMouseMove
     OnMouseMove = GLSceneViewerMouseMove
     TabOrder = 0
     TabOrder = 0
+    ExplicitWidth = 514
+    ExplicitHeight = 270
   end
   end
   object TrackBar: TTrackBar
   object TrackBar: TTrackBar
     Left = 0
     Left = 0
-    Top = 343
-    Width = 514
+    Top = 406
+    Width = 605
     Height = 27
     Height = 27
     Align = alBottom
     Align = alBottom
     Max = 180
     Max = 180
@@ -44,11 +46,13 @@ object Form1: TForm1
     ThumbLength = 10
     ThumbLength = 10
     TickMarks = tmBoth
     TickMarks = tmBoth
     OnChange = TrackBarChange
     OnChange = TrackBarChange
+    ExplicitTop = 343
+    ExplicitWidth = 514
   end
   end
   object TrackBar1: TTrackBar
   object TrackBar1: TTrackBar
     Left = 0
     Left = 0
     Top = 41
     Top = 41
-    Width = 514
+    Width = 605
     Height = 32
     Height = 32
     Align = alTop
     Align = alTop
     Max = 50
     Max = 50
@@ -59,17 +63,19 @@ object Form1: TForm1
     ThumbLength = 10
     ThumbLength = 10
     TickMarks = tmBoth
     TickMarks = tmBoth
     OnChange = TrackBar1Change
     OnChange = TrackBar1Change
+    ExplicitWidth = 514
   end
   end
   object Panel1: TPanel
   object Panel1: TPanel
     Left = 0
     Left = 0
     Top = 0
     Top = 0
-    Width = 514
+    Width = 605
     Height = 41
     Height = 41
     Align = alTop
     Align = alTop
     BevelOuter = bvNone
     BevelOuter = bvNone
     TabOrder = 3
     TabOrder = 3
+    ExplicitWidth = 514
     DesignSize = (
     DesignSize = (
-      514
+      605
       41)
       41)
     object Label1: TLabel
     object Label1: TLabel
       Left = 10
       Left = 10
@@ -106,7 +112,7 @@ object Form1: TForm1
       OnClick = RBFMODClick
       OnClick = RBFMODClick
     end
     end
     object Button1: TButton
     object Button1: TButton
-      Left = 423
+      Left = 514
       Top = 2
       Top = 2
       Width = 83
       Width = 83
       Height = 25
       Height = 25
@@ -114,9 +120,10 @@ object Form1: TForm1
       Caption = 'Chimes (WAV)'
       Caption = 'Chimes (WAV)'
       TabOrder = 2
       TabOrder = 2
       OnClick = Button1Click
       OnClick = Button1Click
+      ExplicitLeft = 423
     end
     end
     object btnHowl: TButton
     object btnHowl: TButton
-      Left = 334
+      Left = 425
       Top = 2
       Top = 2
       Width = 83
       Width = 83
       Height = 25
       Height = 25
@@ -124,6 +131,7 @@ object Form1: TForm1
       Caption = 'Howl (MP3)'
       Caption = 'Howl (MP3)'
       TabOrder = 3
       TabOrder = 3
       OnClick = btnHowlClick
       OnClick = btnHowlClick
+      ExplicitLeft = 334
     end
     end
     object RBOpenAL: TRadioButton
     object RBOpenAL: TRadioButton
       Left = 224
       Left = 224

+ 4 - 4
Demos/CPP/sound/3Dsound/Unit1.h

@@ -17,15 +17,15 @@
 #include "GLS.GeomObjects.hpp"
 #include "GLS.GeomObjects.hpp"
 #include "GLS.Objects.hpp"
 #include "GLS.Objects.hpp"
 #include "GLS.Scene.hpp"
 #include "GLS.Scene.hpp"
-#include "GLSMBASS.hpp"
-#include "GLSMFMOD.hpp"
-#include "GLSMOpenAL.hpp"
+#include "Sounds.BASS.hpp"
+#include "Sounds.FMOD.hpp"
+#include "Sounds.OpenAL.hpp"
 #include "GLS.Sound.hpp"
 #include "GLS.Sound.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.Utils.hpp"
 #include "GLS.Utils.hpp"
 #include "GLS.FileWAV.hpp"
 #include "GLS.FileWAV.hpp"
 #include "GLS.FileMP3.hpp"
 #include "GLS.FileMP3.hpp"
-#include "BASS.hpp"
+#include "Import.BASS.hpp"
 
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 class TForm1 : public TForm
 class TForm1 : public TForm

+ 1 - 1
Demos/Delphi/meshes/terrain/Unit1.pas

@@ -31,7 +31,7 @@ uses
   GLS.SkyDome,
   GLS.SkyDome,
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.Sound,
   GLS.Sound,
-  GLSM.BASS,
+  Sounds.BASS,
   GLS.VectorGeometry,
   GLS.VectorGeometry,
   GLS.LensFlare,
   GLS.LensFlare,
   GLS.Material,
   GLS.Material,

+ 1 - 1
Demos/Delphi/sound/3Dsound BASS/Unit1.pas

@@ -18,7 +18,7 @@ uses
   GLS.Cadencer,
   GLS.Cadencer,
   GLS.Objects,
   GLS.Objects,
   GLS.Sound,
   GLS.Sound,
-  GLSM.BASS,
+  Sounds.BASS,
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.GeomObjects,
   GLS.GeomObjects,
 
 

+ 1 - 1
Demos/Delphi/sound/3Dsound FMOD/Unit1.pas

@@ -17,7 +17,7 @@ uses
   GLS.VectorTypes,
   GLS.VectorTypes,
   GLS.Objects,
   GLS.Objects,
   GLS.Sound,
   GLS.Sound,
-  GLSM.FMOD,
+  Sounds.FMOD,
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.GeomObjects,
   GLS.GeomObjects,
  
  

+ 1 - 1
Demos/Delphi/sound/3Dsound OpenAL/Unit1.pas

@@ -19,7 +19,7 @@ uses
   GLS.Sound,
   GLS.Sound,
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.GeomObjects,
   GLS.GeomObjects,
-  GLSM.OpenAL,
+  Sounds.OpenAL,
 
 
   GLS.Coordinates,
   GLS.Coordinates,
   GLS.BaseClasses,
   GLS.BaseClasses,

+ 1 - 1
Demos/Delphi/sound/3Dsound WaveOut/Unit1.pas

@@ -18,7 +18,7 @@ uses
   GLS.VectorTypes,
   GLS.VectorTypes,
   GLS.VectorGeometry,
   GLS.VectorGeometry,
   GLS.Sound,
   GLS.Sound,
-  GLSM.WaveOut,
+  Sounds.WaveOut,
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.GeomObjects,
   GLS.GeomObjects,
 
 

+ 4 - 4
Demos/Delphi/sound/3Dsound/Unit1.pas

@@ -20,10 +20,10 @@ uses
   GLS.SceneViewer,
   GLS.SceneViewer,
   GLS.GeomObjects,
   GLS.GeomObjects,
   GLS.Sound,
   GLS.Sound,
-  GLSM.FMOD,
-  GLSM.BASS,
-  GLSM.OpenAL,
-  GLSM.WaveOut,
+  Sounds.FMOD,
+  Sounds.BASS,
+  Sounds.OpenAL,
+  Sounds.WaveOut,
  
  
   GLS.Coordinates,
   GLS.Coordinates,
   GLS.BaseClasses,
   GLS.BaseClasses,

+ 1 - 1
Packages/GLScene_Sounds_DT.dpk

@@ -38,6 +38,6 @@ requires
   GLScene_Sounds_RT;
   GLScene_Sounds_RT;
 
 
 contains
 contains
-  GLSM.SoundRegister in '..\Source\GLSM.SoundRegister.pas';
+  Sounds.SoundRegister in '..\Source\Sounds.SoundRegister.pas';
 
 
 end.
 end.

+ 1 - 1
Packages/GLScene_Sounds_DT.dproj

@@ -112,7 +112,7 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
         <DCCReference Include="GLScene_Sounds_RT.dcp"/>
         <DCCReference Include="GLScene_Sounds_RT.dcp"/>
-        <DCCReference Include="..\Source\GLSM.SoundRegister.pas"/>
+        <DCCReference Include="..\Source\Sounds.SoundRegister.pas"/>
         <RcCompile Include="..\Resources\GLSceneSounds.rc">
         <RcCompile Include="..\Resources\GLSceneSounds.rc">
             <Form>GLSceneSounds.res</Form>
             <Form>GLSceneSounds.res</Form>
         </RcCompile>
         </RcCompile>

+ 4 - 4
Packages/GLScene_Sounds_RT.dpk

@@ -40,10 +40,10 @@ contains
   Import.FMODtypes in '..\Source\Import.FMODtypes.pas',
   Import.FMODtypes in '..\Source\Import.FMODtypes.pas',
   Import.FMODerrors in '..\Source\Import.FMODerrors.pas',
   Import.FMODerrors in '..\Source\Import.FMODerrors.pas',
   Import.OpenAL in '..\Source\Import.OpenAL.pas',
   Import.OpenAL in '..\Source\Import.OpenAL.pas',
-  GLSM.BASS in '..\Source\GLSM.BASS.pas',
-  GLSM.FMOD in '..\Source\GLSM.FMOD.pas',
-  GLSM.OpenAL in '..\Source\GLSM.OpenAL.pas',
-  GLSM.WaveOut in '..\Source\GLSM.WaveOut.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';
   Import.BASS in '..\Source\Import.BASS.pas';
 
 
 end.
 end.

+ 4 - 4
Packages/GLScene_Sounds_RT.dproj

@@ -153,10 +153,10 @@
         <DCCReference Include="..\Source\Import.FMODtypes.pas"/>
         <DCCReference Include="..\Source\Import.FMODtypes.pas"/>
         <DCCReference Include="..\Source\Import.FMODerrors.pas"/>
         <DCCReference Include="..\Source\Import.FMODerrors.pas"/>
         <DCCReference Include="..\Source\Import.OpenAL.pas"/>
         <DCCReference Include="..\Source\Import.OpenAL.pas"/>
-        <DCCReference Include="..\Source\GLSM.BASS.pas"/>
-        <DCCReference Include="..\Source\GLSM.FMOD.pas"/>
-        <DCCReference Include="..\Source\GLSM.OpenAL.pas"/>
-        <DCCReference Include="..\Source\GLSM.WaveOut.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\Import.BASS.pas"/>
         <BuildConfiguration Include="Debug">
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <Key>Cfg_2</Key>

+ 2 - 1
Source/Import.BASS.pas

@@ -1,6 +1,7 @@
 (*
 (*
   BASS 2.4 Delphi unit
   BASS 2.4 Delphi unit
-  Copyright (c) 1999-2017 Un4seen Developments Ltd.
+  Copyright (c) 1999-2021 Un4seen Developments Ltd.
+  http://www.un4seen.com/music/, free for freeware
 
 
   See the BASS.CHM file for more detailed documentation
   See the BASS.CHM file for more detailed documentation
 
 

+ 4 - 9
Source/GLSM.BASS.pas → Source/Sounds.BASS.pas

@@ -1,13 +1,11 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
-unit GLSM.BASS;
+unit Sounds.BASS;
 
 
 (*
 (*
-  BASS based sound-manager (http://www.un4seen.com/music/, free for freeware).
-  Unsupported feature(s) :
-  sound source velocity
+  BASS based sound-manager http://www.un4seen.com/music/, free for freeware
+  Unsupported feature(s) : sound source velocity,
   looping (sounds are played either once or forever)
   looping (sounds are played either once or forever)
   source priorities (not relevant, channels are not limited)
   source priorities (not relevant, channels are not limited)
 *)
 *)
@@ -187,7 +185,6 @@ begin
   begin
   begin
     KillSource(aSource);
     KillSource(aSource);
   end;
   end;
-
   if (aSource.sample = nil) or (aSource.sample.Data = nil) or
   if (aSource.sample = nil) or (aSource.sample.Data = nil) or
     (aSource.sample.Data.WAVDataSize = 0) then
     (aSource.sample.Data.WAVDataSize = 0) then
     Exit;
     Exit;
@@ -240,11 +237,9 @@ begin
       Round(aSource.OutsideConeAngle), Round(aSource.ConeOutsideVolume * 100));
       Round(aSource.OutsideConeAngle), Round(aSource.ConeOutsideVolume * 100));
     if not aSource.Pause then
     if not aSource.Pause then
       BASS_ChannelPlay(p.channel, True);
       BASS_ChannelPlay(p.channel, True);
-
   end
   end
   else
   else
     BASS_ChannelSet3DPosition(p.channel, position, orientation, velocity);
     BASS_ChannelSet3DPosition(p.channel, position, orientation, velocity);
-
   if p.channel <> 0 then
   if p.channel <> 0 then
   begin
   begin
     res := BASS_ChannelSetAttribute(p.channel, BASS_ATTRIB_FREQ, 0);
     res := BASS_ChannelSetAttribute(p.channel, BASS_ATTRIB_FREQ, 0);
@@ -307,7 +302,7 @@ begin
     Assert(False);
     Assert(False);
   // update sources
   // update sources
   inherited;
   inherited;
-  { if not } BASS_Apply3D; { then Assert(False); }
+  (* if not *) BASS_Apply3D; (* then Assert(False); *)
 end;
 end;
 
 
 function TGLSMBASS.CPUUsagePercent: Single;
 function TGLSMBASS.CPUUsagePercent: Single;

+ 1 - 2
Source/GLSM.FMOD.pas → Source/Sounds.FMOD.pas

@@ -1,8 +1,7 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
-unit GLSM.FMOD;
+unit Sounds.FMOD;
 
 
 (*
 (*
   FMOD based sound-manager (http://www.fmod.org/, free for freeware).
   FMOD based sound-manager (http://www.fmod.org/, free for freeware).

+ 3 - 4
Source/GLSM.OpenAL.pas → Source/Sounds.OpenAL.pas

@@ -1,11 +1,10 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
-unit GLSM.OpenAL;
+unit Sounds.OpenAL;
 
 
 (*
 (*
-  OpenAL based sound-manager (http://www.openal.org).
+  OpenAL based sound-manager http://www.openal.org
   OpenAL drivers can be download from the OpenAL site or your soundcard
   OpenAL drivers can be download from the OpenAL site or your soundcard
   manufacturer's website.
   manufacturer's website.
 
 
@@ -30,6 +29,7 @@ uses
   Vcl.Dialogs,
   Vcl.Dialogs,
 
 
   GLS.Scene,
   GLS.Scene,
+  GLS.VectorGeometry,
   GLS.Sound,
   GLS.Sound,
   GLS.SoundFileObjects;
   GLS.SoundFileObjects;
 
 
@@ -64,7 +64,6 @@ implementation
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 
 
 uses
 uses
-  GLS.VectorGeometry,
   Import.OpenAL {al, alut, alTypes};
   Import.OpenAL {al, alut, alTypes};
 
 
 // checks for an error and raises an exception if necessary
 // checks for an error and raises an exception if necessary

+ 6 - 6
Source/GLSM.SoundRegister.pas → Source/Sounds.SoundRegister.pas

@@ -1,8 +1,7 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
-unit GLSM.SoundRegister;
+unit Sounds.SoundRegister;
 
 
 (* Design time registration code for the Sounds *)
 (* Design time registration code for the Sounds *)
 
 
@@ -10,10 +9,11 @@ interface
 
 
 uses
 uses
   System.Classes,
   System.Classes,
-  GLSM.BASS,
-  GLSM.FMOD,
-  GLSM.OpenAL,
-  GLSM.WaveOut;
+
+  Sounds.BASS,
+  Sounds.FMOD,
+  Sounds.OpenAL,
+  Sounds.WaveOut;
 
 
 procedure Register;
 procedure Register;
 
 

+ 9 - 8
Source/GLSM.WaveOut.pas → Source/Sounds.WaveOut.pas

@@ -1,8 +1,7 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
-unit GLSM.WaveOut;
+unit Sounds.WaveOut;
 
 
 (* Basic sound manager based on WinMM *)
 (* Basic sound manager based on WinMM *)
 
 
@@ -143,12 +142,14 @@ begin
   end;
   end;
 end;
 end;
 
 
-// Note: This callback function is called from another thread, from MSDN docs:
-// "Applications should not call any system-defined functions from inside a
-// callback function, except for EnterCriticalSection, LeaveCriticalSection,
-// midiOutLongMsg, midiOutShortMsg, OutputDebugString, PostMessage,
-// PostThreadMessage, SetEvent, timeGetSystemTime, timeGetTime, timeKillEvent,
-// and timeSetEvent. Calling other wave functions will cause deadlock."
+(*
+ Note: This callback function is called from another thread, from MSDN docs:
+ "Applications should not call any system-defined functions from inside a
+ callback function, except for EnterCriticalSection, LeaveCriticalSection,
+ midiOutLongMsg, midiOutShortMsg, OutputDebugString, PostMessage,
+ PostThreadMessage, SetEvent, timeGetSystemTime, timeGetTime, timeKillEvent,
+ and timeSetEvent. Calling other wave functions will cause deadlock."
+*)
 procedure _waveOutCallBack(hwo: HWaveOut; uMsg: Cardinal;
 procedure _waveOutCallBack(hwo: HWaveOut; uMsg: Cardinal;
   dwInstance, dwParam1, dwParam2: Integer); stdcall;
   dwInstance, dwParam1, dwParam2: Integer); stdcall;
 begin
 begin