shithub: dumb

Download patch

ref: b661a11b09185a8e8b8a2c4a5c64021cc928ef12
parent: 7e4d1331dee5772d6eb91073ac68f18b1bd4a55d
author: Chris Moeller <kode54@gmail.com>
date: Tue Mar 4 12:11:22 EST 2014

Fixed offset effect limiting edge case due to samples being 64 points longer due to LPC processing

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -2608,8 +2608,11 @@
 								end = sample->sus_loop_end;
 							else if (sample->flags & IT_SAMPLE_LOOP)
 								end = sample->loop_end;
-							else
+							else {
 								end = sample->length;
+								if ( sigdata->flags & IT_WAS_PROCESSED && end > 64 ) // XXX bah damn LPC and edge case modules
+									end -= 64;
+							}
 							if ((sigdata->flags & IT_WAS_A_PTM) && (sample->flags & IT_SAMPLE_16BIT))
 								offset >>= 1;
 							if (offset < end) {