aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-15 11:59:56 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-15 11:59:56 +0000
commit369659dcddc401fb91a10e4da102d2c1a61b6fb9 (patch)
tree593b2ab593b29d01c94282dc2f33ddb70bf90fd4 /Game/Code/Screens
parentc2b54d4a7e017a6f79e0c6018f07787e0a8b3316 (diff)
downloadusdx-369659dcddc401fb91a10e4da102d2c1a61b6fb9.tar.gz
usdx-369659dcddc401fb91a10e4da102d2c1a61b6fb9.tar.xz
usdx-369659dcddc401fb91a10e4da102d2c1a61b6fb9.zip
fixed bug with Video playback & Visualization, on 2nd song played.
http://trac2.assembla.com/usdx/ticket/31 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@857 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSing.pas23
1 files changed, 19 insertions, 4 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 2342d371..1bf06a7f 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -310,7 +310,8 @@ begin
Lyrics := TLyricEngine.Create(80,Skin_LyricsT,640,12,80,Skin_LyricsT+36,640,12);
- fCurrentVideoPlaybackEngine.Init();
+ if assigned( fCurrentVideoPlaybackEngine ) then
+ fCurrentVideoPlaybackEngine.Init();
end;
procedure TScreenSing.onShow;
@@ -446,6 +447,7 @@ begin
except
success := false;
end;
+
if (not success) then
begin
//Error Loading Song -> Go back to Song Screen and Show some Error Message
@@ -458,15 +460,27 @@ begin
CurrentSong.Path := CatSongs.Song[CatSongs.Selected].Path;
Exit;
end;
-
+
+
+
+ // reset video playback engine, to play Video Clip...
+
+ Visualization.Init();
+
+ fCurrentVideoPlaybackEngine.Close;
+ fCurrentVideoPlaybackEngine := VideoPlayback;
+
// set movie
+ CurrentSong.VideoLoaded := false;
+ fShowVisualization := false;
if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then
begin
// todo: VideoGap and Start time verwursten
+
fCurrentVideoPlaybackEngine.Open( CurrentSong.Path + CurrentSong.Video );
fCurrentVideoPlaybackEngine.position := CurrentSong.VideoGAP + CurrentSong.Start;
-
+
CurrentSong.VideoLoaded := true;
end;
@@ -887,7 +901,7 @@ begin
fCurrentVideoPlaybackEngine.DrawGL(ScreenAct);
// PlaySmpeg;
except
-
+
on E : Exception do
begin
//If an Error occurs Reading Video: prevent Video from being Drawn again and Close Video
@@ -906,6 +920,7 @@ begin
end;
end;
+
// play music (II)
AudioPlayback.Play;