aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-18 03:51:24 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-18 03:51:24 +0000
commitc7e01792aaf8f16bb17d7254d93157d617271391 (patch)
treef07140030b1eb35120576f5ab41ecebbb6e7843b /Game/Code/Screens
parent19903a5497d2a4468280cab56b0cac71207e3c03 (diff)
downloadusdx-c7e01792aaf8f16bb17d7254d93157d617271391.tar.gz
usdx-c7e01792aaf8f16bb17d7254d93157d617271391.tar.xz
usdx-c7e01792aaf8f16bb17d7254d93157d617271391.zip
fixed crash on song play, if the AudioInterface reports the song
as 0 length. fixed ffmpeg bug with song length. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@722 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSong.pas3
1 files changed, 2 insertions, 1 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 0def87ab..03ef793b 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1519,7 +1519,8 @@ begin
if Length(CatSongs.Song) > 0 then begin
//Load Music only when Song Preview is activated
- if (Ini.PreviewVolume <> 0) then
+ if ( Ini.PreviewVolume <> 0 ) AND
+ ( AudioPlayback.Length > 1 ) then
begin
AudioPlayback.SetLoop(false);
AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);