aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-06 12:26:05 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-06 12:26:05 +0000
commitbe68ff31e2d10d5f29894c6ec4ed877c70c142a3 (patch)
tree59991190b77801cbd1e092c9f427a909f67cf3bc /Game/Code/Classes
parent8514766ed130d4c8d7cd06fce956ace10f5afeb9 (diff)
downloadusdx-be68ff31e2d10d5f29894c6ec4ed877c70c142a3.tar.gz
usdx-be68ff31e2d10d5f29894c6ec4ed877c70c142a3.tar.xz
usdx-be68ff31e2d10d5f29894c6ec4ed877c70c142a3.zip
gave priority to videos over Visualization...
so now video plays back... and "V" will switch between Video ( or jpg ) background and visualization. this needs to be pressed on every song, as the state should be forgotten. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@687 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UMedia_dummy.pas2
-rw-r--r--Game/Code/Classes/UMusic.pas24
-rw-r--r--Game/Code/Classes/UVisualizer.pas2
3 files changed, 24 insertions, 4 deletions
diff --git a/Game/Code/Classes/UMedia_dummy.pas b/Game/Code/Classes/UMedia_dummy.pas
index c5fb799c..4fc39d4e 100644
--- a/Game/Code/Classes/UMedia_dummy.pas
+++ b/Game/Code/Classes/UMedia_dummy.pas
@@ -29,7 +29,7 @@ var
singleton_dummy : IVideoPlayback;
type
- Tmedia_dummy = class( TInterfacedObject, IVideoPlayback, IAudioPlayback, IAudioInput )
+ Tmedia_dummy = class( TInterfacedObject, IVideoPlayback, IVideoVisualization, IAudioPlayback, IAudioInput )
private
public
constructor create();
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index 4acbb55a..2cdcc707 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -131,6 +131,10 @@ type
end;
+ IVideoVisualization = Interface( IVideoPlayback )
+ ['{5AC17D60-B34D-478D-B632-EB00D4078017}']
+ end;
+
IAudioPlayback = Interface( IGenericPlayback )
['{E4AE0B40-3C21-4DC5-847C-20A87E0DFB96}']
procedure InitializePlayback;
@@ -195,7 +199,8 @@ var // TODO : JB --- THESE SHOULD NOT BE GLOBAL
procedure InitializeSound;
-
+
+function Visualization(): IVideoPlayback;
function VideoPlayback(): IVideoPlayback;
function AudioPlayback(): IAudioPlayback;
function AudioInput(): IAudioInput;
@@ -210,9 +215,11 @@ uses
// uLog;
var
- singleton_VideoPlayback : IVideoPlayback = nil;
+ singleton_VideoPlayback : IVideoPlayback = nil;
+ singleton_Visualization : IVideoPlayback = nil;
singleton_AudioPlayback : IAudioPlayback = nil;
singleton_AudioInput : IAudioInput = nil;
+
singleton_AudioManager : TInterfaceList = nil;
@@ -230,6 +237,11 @@ begin
result := singleton_VideoPlayback;
end;
+function Visualization(): IVideoPlayback;
+begin
+ result := singleton_Visualization;
+end;
+
function AudioPlayback(): IAudioPlayback;
begin
result := singleton_AudioPlayback;
@@ -250,6 +262,7 @@ begin
singleton_AudioPlayback := nil;
singleton_AudioInput := nil;
singleton_VideoPlayback := nil;
+ singleton_Visualization := nil;
writeln( 'InitializeSound , Enumerate Registered Audio Interfaces' );
for iCount := 0 to AudioManager.Count - 1 do
@@ -276,12 +289,19 @@ begin
// 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;
+ if ( AudioManager[iCount].QueryInterface( IVideoVisualization, lTmpInterface ) = 0 ) AND
+ ( true ) then
+ begin
+ singleton_Visualization := IVideoPlayback( lTmpInterface );
+ end;
+
end;
end;
diff --git a/Game/Code/Classes/UVisualizer.pas b/Game/Code/Classes/UVisualizer.pas
index 08e4b594..b6b3a1cc 100644
--- a/Game/Code/Classes/UVisualizer.pas
+++ b/Game/Code/Classes/UVisualizer.pas
@@ -45,7 +45,7 @@ const
projectM_Dir = visuals_Dir+'/projectM';
type
- TVideoPlayback_ProjectM = class( TInterfacedObject, IVideoPlayback )
+ TVideoPlayback_ProjectM = class( TInterfacedObject, IVideoPlayback, IVideoVisualization )
pm : PProjectM;