From f786f747554c79de3a7aa1fd63cd1e7c2e0763c3 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 5 Mar 2008 11:16:44 +0000 Subject: FFT support for SDL/Portaudio playback git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@909 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenOptionsRecord.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Game/Code/Screens/UScreenOptionsRecord.pas') diff --git a/Game/Code/Screens/UScreenOptionsRecord.pas b/Game/Code/Screens/UScreenOptionsRecord.pas index 3da29f43..53d0b2ad 100644 --- a/Game/Code/Screens/UScreenOptionsRecord.pas +++ b/Game/Code/Screens/UScreenOptionsRecord.pas @@ -384,6 +384,7 @@ var DeviceCfg: PInputDeviceConfig; SelectSlide: TSelectSlide; ToneBoxWidth: real; + Volume: single; begin DrawBG; DrawFG; @@ -434,22 +435,21 @@ begin glVertex2f(x2, y2); glVertex2f(x1, y2); + Volume := PreviewChannel[ChannelIndex].MaxSampleVolume(); + // coordinates for volume bar x1 := x1 + 1; - x2 := x1 + Trunc((SelectSlide.TextureSBG.W-4) * - PreviewChannel[ChannelIndex].MaxSampleVolume()) + 1; + x2 := x1 + Trunc((SelectSlide.TextureSBG.W-4) * Volume) + 1; y1 := y1 + 1; y2 := y2 - 1; // draw volume bar glColor3f(RD, GD, BD); glVertex2f(x1, y1); - glColor3f(R, G, B); - glVertex2f(x2, y1); + glVertex2f(x1, y2); glColor3f(R, G, B); glVertex2f(x2, y2); - glColor3f(RD, GD, BD); - glVertex2f(x1, y2); + glVertex2f(x2, y1); ////////// // draw Pitch -- cgit v1.2.3