shithub: dumb

Download patch

ref: fa1413c69747f35c396fce8bbd8d2fba005bb11e
parent: 58556af70c7d3ad68657cbda7ff3d4d74aefb70e
author: Chris Moeller <kode54@gmail.com>
date: Fri Mar 28 13:50:30 EDT 2014

Changed volume ramping so normal transitions to or from zero volume are quicker

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -3905,7 +3905,14 @@
 	vol = calculate_volume(sigrenderer, playing, 1.0f);
 	playing->float_volume[0] *= vol;
 	playing->float_volume[1] *= vol;
+    
+    rampScale = 4;
 
+    if (ramp_style > 0 && playing->declick_stage == 2) {
+        if ((playing->ramp_volume[0] == 0 && playing->ramp_volume[1] == 0) || vol == 0)
+            rampScale = 48;
+    }
+
     if (ramp_style == 0 || (ramp_style < 2 && playing->declick_stage == 2)) {
 		if (playing->declick_stage <= 2) {
 			playing->ramp_volume[0] = playing->float_volume[0];
@@ -3921,7 +3928,6 @@
 		playing->ramp_delta[0] = 0;
         playing->ramp_delta[1] = 0;
     } else {
-        rampScale = 4;
         if (playing->declick_stage == 0) {
             playing->ramp_volume[0] = 0;
             playing->ramp_volume[1] = 0;