aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UMusic.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-07 04:32:38 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-07 04:32:38 +0000
commit425ff834dbc3933475ee8f783eea6167e92ec174 (patch)
tree09dcc454984ad26455adf206d906beb87a1ea1b3 /Game/Code/Classes/UMusic.pas
parentbd04e1c76d7139287be2244d03f2b62c9d117c0a (diff)
downloadusdx-425ff834dbc3933475ee8f783eea6167e92ec174.tar.gz
usdx-425ff834dbc3933475ee8f783eea6167e92ec174.tar.xz
usdx-425ff834dbc3933475ee8f783eea6167e92ec174.zip
little bit of tidy up..
added command line switch, to see what media interfaces are being used. moved RandomPCM Data generation to Visualizer class. added Visualization preset change, on new line ( may be a little to much... maybe we should do ever 4 or 16 bars or something ?) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@697 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UMusic.pas')
-rw-r--r--Game/Code/Classes/UMusic.pas58
1 files changed, 22 insertions, 36 deletions
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index 2cdcc707..7e1aa839 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -109,21 +109,12 @@ type
procedure MoveTo(Time: real);
function getPosition: real;
-
- property position : real READ getPosition WRITE MoveTo;
+
+ property position : real READ getPosition WRITE MoveTo;
end;
IVideoPlayback = Interface( IGenericPlayback )
['{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 GetFrame(Time: Extended); // WANT TO RENAME THESE TO BE MORE GENERIC
@@ -141,16 +132,10 @@ type
procedure SetVolume(Volume: integer);
procedure SetMusicVolume(Volume: integer);
procedure SetLoop(Enabled: boolean);
-// function Open(Name: string): boolean; // true if succeed
+
procedure Rewind;
-// procedure MoveTo(Time: real);
-// procedure Play;
-// procedure Pause;
-// procedure Stop;
-// procedure Close;
- function Finished: boolean;
- function Length: real;
-// function getPosition: real;
+ function Finished: boolean;
+ function Length: real;
procedure PlayStart;
procedure PlayBack;
@@ -211,7 +196,8 @@ function AudioManager: TInterfaceList;
implementation
uses
- sysutils;
+ sysutils,
+ UCommandLine;
// uLog;
var
@@ -264,7 +250,6 @@ begin
singleton_VideoPlayback := nil;
singleton_Visualization := nil;
- writeln( 'InitializeSound , Enumerate Registered Audio Interfaces' );
for iCount := 0 to AudioManager.Count - 1 do
begin
if assigned( AudioManager[iCount] ) then
@@ -273,7 +258,6 @@ begin
if ( AudioManager[iCount].QueryInterface( IAudioPlayback, lTmpInterface ) = 0 ) AND
( true ) then
-// ( not assigned( singleton_AudioPlayback ) ) then
begin
singleton_AudioPlayback := IAudioPlayback( lTmpInterface );
end;
@@ -281,17 +265,13 @@ begin
// 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 );
- Writeln(singleton_AudioInput.GetName);
end;
// if this interface is a Input, then set it as the default used
if ( AudioManager[iCount].QueryInterface( IVideoPlayback, lTmpInterface ) = 0 ) AND
- //( AudioManager[iCount].QueryInterface( IVideoVisualization, lTmpInterface ) <> 0 ) AND
( true ) then
-// ( not assigned( singleton_VideoPlayback ) ) then
begin
singleton_VideoPlayback := IVideoPlayback( lTmpInterface );
end;
@@ -306,38 +286,44 @@ begin
end;
+
if VideoPlayback <> nil then
begin
- writeln( 'Registered Video Playback Interface : ' + VideoPlayback.GetName );
end;
if AudioPlayback <> nil then
begin
- writeln( 'Registered Audio Playback Interface : ' + AudioPlayback.GetName );
- // Log.LogStatus('Initializing Playback ('+AudioPlayback.GetName+')', 'InitializeSound');
AudioPlayback.InitializePlayback;
end;
if AudioInput <> nil then
begin
- writeln( 'Registered Audio Input Interface : ' + AudioInput.GetName );
-
-// Log.LogStatus('Initializing Record ('+AudioPlayback.GetName+')', 'InitializeSound');
AudioInput.InitializeRecord;
end;
- writeln( 'InitializeSound DONE' );
+ if FindCmdLineSwitch( cMediaInterfaces ) then
+ begin
+ writeln( '' );
+ writeln( '--------------------------------------------------------------' );
+ writeln( ' In-use Media Interfaces ' );
+ writeln( '--------------------------------------------------------------' );
+ writeln( 'Registered Audio Playback Interface : ' + AudioPlayback.GetName );
+ writeln( 'Registered Audio Input Interface : ' + AudioInput.GetName );
+ writeln( 'Registered Video Playback Interface : ' + VideoPlayback.GetName );
+ writeln( 'Registered Visualization Interface : ' + Visualization.GetName );
+ writeln( '--------------------------------------------------------------' );
+ writeln( '' );
+ halt;
+ end;
end;
initialization
begin
- writeln('Init AudioManager');
singleton_AudioManager := TInterfaceList.Create();
end;
finalization
- writeln('Finalize AudioManager');
singleton_AudioManager.clear;
FreeAndNil( singleton_AudioManager );