ソースを参照

Added Sounds. before corresponding units

GLScene 4 年 前
コミット
d9b24d37a9

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

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

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

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

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

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

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

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

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

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

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

@@ -13,9 +13,9 @@
 #pragma link "GLS.GeomObjects"
 #pragma link "GLS.Objects"
 #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.SceneViewer"
 #pragma link "GLS.FileWAV"

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

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

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

@@ -17,15 +17,15 @@
 #include "GLS.GeomObjects.hpp"
 #include "GLS.Objects.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.SceneViewer.hpp"
 #include "GLS.Utils.hpp"
 #include "GLS.FileWAV.hpp"
 #include "GLS.FileMP3.hpp"
-#include "BASS.hpp"
+#include "Import.BASS.hpp"
 
 //---------------------------------------------------------------------------
 class TForm1 : public TForm

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

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

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

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

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

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

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

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

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

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

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

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

+ 1 - 1
Packages/GLScene_Sounds_DT.dpk

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

+ 1 - 1
Packages/GLScene_Sounds_DT.dproj

@@ -112,7 +112,7 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="GLScene_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">
             <Form>GLSceneSounds.res</Form>
         </RcCompile>

+ 4 - 4
Packages/GLScene_Sounds_RT.dpk

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

+ 4 - 4
Packages/GLScene_Sounds_RT.dproj

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

+ 2 - 1
Source/Import.BASS.pas

@@ -1,6 +1,7 @@
 (*
   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
 

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

@@ -1,13 +1,11 @@
 //
 // 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)
   source priorities (not relevant, channels are not limited)
 *)
@@ -187,7 +185,6 @@ begin
   begin
     KillSource(aSource);
   end;
-
   if (aSource.sample = nil) or (aSource.sample.Data = nil) or
     (aSource.sample.Data.WAVDataSize = 0) then
     Exit;
@@ -240,11 +237,9 @@ begin
       Round(aSource.OutsideConeAngle), Round(aSource.ConeOutsideVolume * 100));
     if not aSource.Pause then
       BASS_ChannelPlay(p.channel, True);
-
   end
   else
     BASS_ChannelSet3DPosition(p.channel, position, orientation, velocity);
-
   if p.channel <> 0 then
   begin
     res := BASS_ChannelSetAttribute(p.channel, BASS_ATTRIB_FREQ, 0);
@@ -307,7 +302,7 @@ begin
     Assert(False);
   // update sources
   inherited;
-  { if not } BASS_Apply3D; { then Assert(False); }
+  (* if not *) BASS_Apply3D; (* then Assert(False); *)
 end;
 
 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
 //
-
-unit GLSM.FMOD;
+unit Sounds.FMOD;
 
 (*
   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
 //
-
-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
   manufacturer's website.
 
@@ -30,6 +29,7 @@ uses
   Vcl.Dialogs,
 
   GLS.Scene,
+  GLS.VectorGeometry,
   GLS.Sound,
   GLS.SoundFileObjects;
 
@@ -64,7 +64,6 @@ implementation
 // ---------------------------------------------------------------------
 
 uses
-  GLS.VectorGeometry,
   Import.OpenAL {al, alut, alTypes};
 
 // 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
 //
-
-unit GLSM.SoundRegister;
+unit Sounds.SoundRegister;
 
 (* Design time registration code for the Sounds *)
 
@@ -10,10 +9,11 @@ interface
 
 uses
   System.Classes,
-  GLSM.BASS,
-  GLSM.FMOD,
-  GLSM.OpenAL,
-  GLSM.WaveOut;
+
+  Sounds.BASS,
+  Sounds.FMOD,
+  Sounds.OpenAL,
+  Sounds.WaveOut;
 
 procedure Register;
 

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

@@ -1,8 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
-unit GLSM.WaveOut;
+unit Sounds.WaveOut;
 
 (* Basic sound manager based on WinMM *)
 
@@ -143,12 +142,14 @@ begin
   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;
   dwInstance, dwParam1, dwParam2: Integer); stdcall;
 begin