shithub: pt2-clone

Download patch

ref: 37069678c8a822cf43703ae627cdaa9768431e15
parent: 9b62d4de7960879e6524f7bcaeb3c007654a8301
author: Olav Sørensen <olav.sorensen@live.no>
date: Wed Feb 12 18:22:15 EST 2020

STK/UST loop fix

Divide loopstart by two on all STK/UST modules instead of very specific ones.

--- a/src/pt2_modloader.c
+++ b/src/pt2_modloader.c
@@ -459,11 +459,8 @@
 			s->loopLength = (uint16_t)loopLength;
 		}
 
-		/* Ultimate SoundTracker before version 2.5 had loopStart in bytes, not words
-		** XXX: This has to be verified... It's possible that it was before that,
-		** and that this breaks some modules.
-		*/
-		if (mightBeSTK && !lateSTKVerFlag)
+		// in The Ultimate SoundTracker, sample loop start is in bytes, not words
+		if (mightBeSTK)
 			s->loopStart /= 2;
 
 		// fix for poorly converted STK (< v2.5) -> PT/NT modules (FIXME: Worth keeping or not?)