aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
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;