diff options
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UMusic.pas | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas index 88d845f7..f3342625 100644 --- a/Game/Code/Classes/UMusic.pas +++ b/Game/Code/Classes/UMusic.pas @@ -94,13 +94,13 @@ type type IGenericPlayback = Interface - ['{63A5EBC3-3F4D-4F23-8DFB-B5165FCE33DD}']
- function GetName: String;
-
- function Open(Name: string): boolean; // true if succeed
- procedure Close;
-
- procedure Play;
+ ['{63A5EBC3-3F4D-4F23-8DFB-B5165FCE33DD}'] + function GetName: String; + + function Open(Name: string): boolean; // true if succeed + procedure Close; + + procedure Play; procedure Pause; procedure Stop; @@ -108,24 +108,24 @@ type function getPosition: real; property position : real READ getPosition WRITE MoveTo; - end;
+ end; IVideoPlayback = Interface( IGenericPlayback ) - ['{3574C40C-28AE-4201-B3D1-3D1F0759B131}']
-(*
- procedure FFmpegOpenFile(FileName: pAnsiChar);
+ ['{3574C40C-28AE-4201-B3D1-3D1F0759B131}'] +(* + procedure FFmpegOpenFile(FileName: pAnsiChar); procedure FFmpegClose; procedure FFmpegGetFrame(Time: Extended); procedure FFmpegDrawGL(Screen: integer); procedure FFmpegTogglePause; procedure FFmpegSkip(Time: Single); -*)
- procedure init();
-
- procedure FFmpegGetFrame(Time: Extended); // WANT TO RENAME THESE TO BE MORE GENERIC
+*) + procedure init(); + + procedure FFmpegGetFrame(Time: Extended); // WANT TO RENAME THESE TO BE MORE GENERIC procedure FFmpegDrawGL(Screen: integer); // WANT TO RENAME THESE TO BE MORE GENERIC -
+ end; IAudioPlayback = Interface( IGenericPlayback ) @@ -212,13 +212,13 @@ var singleton_AudioInput : IAudioInput = nil; singleton_AudioManager : TInterfaceList = nil; -
-function AudioManager: TInterfaceList;
-begin
- if singleton_AudioManager = nil then
- singleton_AudioManager := TInterfaceList.Create();
-
- Result := singleton_AudioManager;
+ +function AudioManager: TInterfaceList; +begin + if singleton_AudioManager = nil then + singleton_AudioManager := TInterfaceList.Create(); + + Result := singleton_AudioManager; end; //CompressionPluginManager @@ -234,7 +234,7 @@ end; function AudioInput(): IAudioInput; begin - result := singleton_AudioInput;
+ result := singleton_AudioInput; end; procedure InitializeSound; @@ -253,33 +253,33 @@ begin begin if assigned( AudioManager[iCount] ) then begin - // if this interface is a Playback, then set it as the default used
-
- if ( AudioManager[iCount].QueryInterface( IAudioPlayback, lTmpInterface ) = 0 ) AND
- ( true ) then
+ // if this interface is a Playback, then set it as the default used + + if ( AudioManager[iCount].QueryInterface( IAudioPlayback, lTmpInterface ) = 0 ) AND + ( true ) then // ( not assigned( singleton_AudioPlayback ) ) then begin - singleton_AudioPlayback := IAudioPlayback( lTmpInterface );
- end;
-
- // if this interface is a Input, then set it as the default used
- if ( AudioManager[iCount].QueryInterface( IAudioInput, lTmpInterface ) = 0 ) AND
- ( true ) then
-// ( not assigned( singleton_AudioInput ) ) then
+ singleton_AudioPlayback := IAudioPlayback( lTmpInterface ); + end; + + // if this interface is a Input, then set it as the default used + if ( AudioManager[iCount].QueryInterface( IAudioInput, lTmpInterface ) = 0 ) AND + ( true ) then +// ( not assigned( singleton_AudioInput ) ) then begin - singleton_AudioInput := IAudioInput( lTmpInterface );
- end;
-
- // if this interface is a Input, then set it as the default used
- if ( AudioManager[iCount].QueryInterface( IVideoPlayback, lTmpInterface ) = 0 ) AND
- ( true ) then
-// ( not assigned( singleton_VideoPlayback ) ) then
+ singleton_AudioInput := IAudioInput( lTmpInterface ); + end; + + // if this interface is a Input, then set it as the default used + if ( AudioManager[iCount].QueryInterface( IVideoPlayback, lTmpInterface ) = 0 ) AND + ( true ) then +// ( not assigned( singleton_VideoPlayback ) ) then begin - singleton_VideoPlayback := IVideoPlayback( lTmpInterface );
- end;
-
- end;
- end;
+ singleton_VideoPlayback := IVideoPlayback( lTmpInterface ); + end; + + end; + end; if VideoPlayback <> nil then @@ -307,14 +307,14 @@ begin end; initialization -begin
- writeln('Init AudioManager');
- singleton_AudioManager := TInterfaceList.Create();
-end;
-
-finalization
- writeln('Finalize AudioManager');
- singleton_AudioManager.clear;
+begin + writeln('Init AudioManager'); + singleton_AudioManager := TInterfaceList.Create(); +end; + +finalization + writeln('Finalize AudioManager'); + singleton_AudioManager.clear; FreeAndNil( singleton_AudioManager ); end. |