Skip to content

Commit d9ee6f7

Browse files
committed
[IT] Increase the number of max-samples even further (beyond Schism) due to files exported by openMPT.
1 parent 145523c commit d9ee6f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

playit/itload.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ OCP_INTERNAL int it_load (struct cpifaceSessionAPI_t *cpifaceSession, struct it_
8181
int maxchan;
8282

8383
#define MAX_ORDERS 256
84-
#define MAX_SAMPLES 236
85-
#define MAX_INSTRUMENTS MAX_SAMPLES
84+
#define MAX_SAMPLES 4000 /* Schism: 236, OpenMPT sample mode: 256 OpenMPT instrument mode 4000 */
85+
#define MAX_INSTRUMENTS 256 /* Schism: 236, OpenMPT 256 */
8686
#define MAX_PATTERNS 240
8787

8888
uint8_t ords[MAX_ORDERS];
@@ -163,7 +163,7 @@ OCP_INTERNAL int it_load (struct cpifaceSessionAPI_t *cpifaceSession, struct it_
163163
}
164164
if (hdr.nsmps>MAX_SAMPLES)
165165
{
166-
cpifaceSession->cpiDebug (cpifaceSession, "[IT] Too many samples\n");
166+
cpifaceSession->cpiDebug (cpifaceSession, "[IT] Too many samples (%u > %u)\n", hdr.nsmps, MAX_SAMPLES);
167167
return errFormStruc;
168168
}
169169
if (hdr.npats>MAX_PATTERNS)

0 commit comments

Comments
 (0)