shithub: dumb

Download patch

ref: fed6a743dd695249dde84369b09ac8a4e6facfe7
parent: 9fc8f92d437a8132e90d53c94e6ca019b928dd1c
author: Chris Moeller <kode54@gmail.com>
date: Fri Sep 27 15:57:03 EDT 2013

Reworked declicker final volume propagation a bit

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -4912,8 +4912,6 @@
 				declick_target = playing->declick_volume + declick_dir / declick_count * declick_remain;
 				declick_lvol.volume = lvol.volume * playing->declick_volume;
 				declick_rvol.volume = rvol.volume * playing->declick_volume;
-				lvol.volume += lvol.delta * declick_remain;
-				rvol.volume += rvol.delta * declick_remain;
 				declick_lvol.target = lvol.volume * declick_target;
 				declick_rvol.target = rvol.volume * declick_target;
 				declick_lvol.delta = (declick_lvol.target - declick_lvol.volume) / declick_remain;
@@ -4934,6 +4932,8 @@
 					size_rendered = render_playing_part(sigrenderer, playing, &declick_lvol, &declick_rvol, bits, delta, pos, remain, samples, store_end_sample, 3);
 					playing->declick_volume = declick_target;
 				}
+				lvol.volume = declick_lvol.volume;
+				rvol.volume = declick_rvol.volume;
 			} else /*if (playing->declick_stage == 3)*/ {
 				(*left_to_mix)++;
 			}