aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-01-14 00:31:20 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-01-14 00:31:20 +0000
commitf153a656e343f043673f97203ca680797196335e (patch)
treedc3eb1eaad46baf2da0f85dde3a0a25bb8364f25 /Game/Code/Screens
parent8226572159609fc0ee15de155d84576c00163371 (diff)
downloadusdx-f153a656e343f043673f97203ca680797196335e.tar.gz
usdx-f153a656e343f043673f97203ca680797196335e.tar.xz
usdx-f153a656e343f043673f97203ca680797196335e.zip
Bugfix: when entering the song-screen the preview on the first song was never played. Reason: Length of audio-file was checked _before_ it was opened.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@793 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSong.pas25
1 files changed, 13 insertions, 12 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 4b42288a..a54bda9f 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1519,19 +1519,20 @@ begin
if Length(CatSongs.Song) > 0 then begin
//Load Music only when Song Preview is activated
- if ( Ini.PreviewVolume <> 0 ) AND
- ( AudioPlayback.Length > 1 ) then
+ if ( Ini.PreviewVolume <> 0 ) then
begin
- AudioPlayback.SetLoop(false);
- AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);
- AudioPlayback.Position := AudioPlayback.Length / 4;
- AudioPlayback.Play;
-
- //Set Preview Volume
- AudioPlayback.SetMusicVolume (Ini.PreviewVolume * 10);
- {//if Music Fade is activated, Set Volume to 0 %
- if (Ini.PreviewFading <> 0) then
- Music.SetMusicVolume(0);}
+ if(AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3)) then
+ begin
+ AudioPlayback.SetLoop(false);
+ AudioPlayback.Position := AudioPlayback.Length / 4;
+ AudioPlayback.Play;
+
+ //Set Preview Volume
+ AudioPlayback.SetMusicVolume (Ini.PreviewVolume * 10);
+ {//if Music Fade is activated, Set Volume to 0 %
+ if (Ini.PreviewFading <> 0) then
+ Music.SetMusicVolume(0);}
+ end;
end;
SetScroll;