aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSong.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-10 12:28:56 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-10 12:28:56 +0000
commitc6da424a1508eae4538244b4d00ddf1f0436b1b7 (patch)
tree18a125cc8a590c0916811e47c912134278e92bb7 /Game/Code/Screens/UScreenSong.pas
parent8af89b5940bd15b013e3f48536888e352eb1c43b (diff)
downloadusdx-c6da424a1508eae4538244b4d00ddf1f0436b1b7.tar.gz
usdx-c6da424a1508eae4538244b4d00ddf1f0436b1b7.tar.xz
usdx-c6da424a1508eae4538244b4d00ddf1f0436b1b7.zip
Volumes are floating point values (single) now. The range changed from [0 .. 100] to [0.0 .. 1.0]
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1081 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens/UScreenSong.pas')
-rw-r--r--Game/Code/Screens/UScreenSong.pas25
1 files changed, 15 insertions, 10 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 82d5100a..06314bcd 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1497,17 +1497,21 @@ end;
procedure TScreenSong.onHide;
begin
- //When Music Fading is activated, Turn Music to 100 %
- If (Ini.PreviewVolume <> 100) or (Ini.PreviewFading <> 0) then
- AudioPlayback.SetVolume(100);
+ // if music fading is activated, turn music to 100%
+ If (IPreviewVolumeVals[Ini.PreviewVolume] <> 1.0) or (Ini.PreviewFading <> 0) then
+ AudioPlayback.SetVolume(1.0);
- //If Preview is deactivated: Load MUsicfile now
- If (Ini.PreviewVolume = 0) then
+ // if preview is deactivated: load musicfile now
+ If (IPreviewVolumeVals[Ini.PreviewVolume] = 0) then
AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);
- //When hide then Stop Music (For Party Mode Popup on Exit)
- if (Display.NextScreen <> @ScreenSing) and (Display.NextScreen <> @ScreenSingModi) and (AudioPlayback <> nil) then
- AudioPlayback.Stop;
+ // if hide then stop music (for party mode popup on exit)
+ if (Display.NextScreen <> @ScreenSing) and
+ (Display.NextScreen <> @ScreenSingModi) then
+ begin
+ if (AudioPlayback <> nil) then
+ AudioPlayback.Stop;
+ end;
end;
procedure TScreenSong.DrawExtensions;
@@ -1613,6 +1617,7 @@ begin
DrawExtensions;
+ Result := true;
end;
procedure TScreenSong.SelectNext;
@@ -1701,14 +1706,14 @@ begin
if (Ini.PreviewFading = 0) then
begin
// music fade disabled: start with full volume
- AudioPlayback.SetVolume(Ini.PreviewVolume * 10);
+ AudioPlayback.SetVolume(IPreviewVolumeVals[Ini.PreviewVolume]);
AudioPlayback.Play()
end
else
begin
// music fade enabled: start muted and fade-in
AudioPlayback.SetVolume(0);
- AudioPlayback.FadeIn(Ini.PreviewFading, Ini.PreviewVolume * 10);
+ AudioPlayback.FadeIn(Ini.PreviewFading, IPreviewVolumeVals[Ini.PreviewVolume]);
end;
end;
end;