changeset 1171:bc7473c0b9ce

Assume that sample type 3 is basically misinterpretation of the field as a bitfield, and accept that has bidi-loop value in the XM loader.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Mar 2015 07:52:09 +0200
parents ef5a9c51569c
children 0ec370b1c8d4
files minijss/jloadxm.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jloadxm.c	Thu Mar 05 07:49:33 2015 +0200
+++ b/minijss/jloadxm.c	Thu Mar 05 07:52:09 2015 +0200
@@ -353,12 +353,11 @@
     {
         case 0: inst->flags = 0; break;
         case 1: inst->flags = jsfLooped; break;
-        case 2: inst->flags = jsfLooped | jsfBiDi; break;
         default:
-            inst->flags = 0;
-            JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
-            "Samp #%d/%d: Invalid sample type 0x%x\n",
-            ninst, nsample, xmS.type);
+                // Basically 2 is the value for bidi-loop, and
+                // 3 is undefined, but some module writers might've
+                // assumed that this is a bit-field, e.g. 1 | 2 = 3
+                inst->flags = jsfLooped | jsfBiDi; break;
             break;
     }