changeset 271:6d9a3577741b

XM effect '9xx' stores its last non-zero parameter.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Oct 2012 20:27:17 +0300
parents 89a05a5e7a82
children 64876c3cbcf3
files jssplr.c jssplr.h
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jssplr.c	Wed Oct 10 19:31:09 2012 +0300
+++ b/jssplr.c	Wed Oct 10 20:27:17 2012 +0300
@@ -1061,9 +1061,11 @@
             break;
 
         case '9':        // 9xx = Set Sample Offset : IMPL.VERIFIED
+            if (param != 0)
+                chn->lastSampleOffsetParam = param;
             if (chn->newDataFlags & cdfNewPitch)
             {
-                chn->position = param * 0x100;
+                chn->position = chn->lastSampleOffsetParam * 0x100;
                 JMPSETNDFLAGS(cdfNewPos);
             }
             break;
--- a/jssplr.h	Wed Oct 10 19:31:09 2012 +0300
+++ b/jssplr.h	Wed Oct 10 20:27:17 2012 +0300
@@ -96,6 +96,8 @@
 
             lastMultiRetrigParamX,
             lastMultiRetrigParamY,
+
+            lastSampleOffsetParam,
             
             iSaveNDFlags;           // For notedelay-effect
 } JSSPlayerChannel;