XM import: use ES5506
This commit is contained in:
parent
12a0e79ef8
commit
22f92113a4
|
@ -83,6 +83,19 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
|
|
||||||
logV("channels: %d",totalChans);
|
logV("channels: %d",totalChans);
|
||||||
|
|
||||||
|
if (totalChans<0) {
|
||||||
|
logE("invalid channel count!");
|
||||||
|
lastError="invalid channel count";
|
||||||
|
delete[] file;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (totalChans>127) {
|
||||||
|
logE("invalid channel count!");
|
||||||
|
lastError="invalid channel count";
|
||||||
|
delete[] file;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
logV("repeat pos: %d",loopPos);
|
logV("repeat pos: %d",loopPos);
|
||||||
|
|
||||||
logV("reading orders...");
|
logV("reading orders...");
|
||||||
|
@ -93,6 +106,11 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i=0; i<(totalChans+31)>>5; i++) {
|
||||||
|
ds.system[i]=DIV_SYSTEM_ES5506;
|
||||||
|
}
|
||||||
|
ds.systemLen=(totalChans+31)>>5;
|
||||||
|
|
||||||
logV("seeking to %x...",headerSeek);
|
logV("seeking to %x...",headerSeek);
|
||||||
|
|
||||||
if (!reader.seek(headerSeek,SEEK_SET)) {
|
if (!reader.seek(headerSeek,SEEK_SET)) {
|
||||||
|
@ -207,7 +225,6 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// read instruments
|
// read instruments
|
||||||
logV("damn: %x",reader.tell());
|
|
||||||
for (int i=0; i<ds.insLen; i++) {
|
for (int i=0; i<ds.insLen; i++) {
|
||||||
unsigned char volEnv[48];
|
unsigned char volEnv[48];
|
||||||
unsigned char panEnv[48];
|
unsigned char panEnv[48];
|
||||||
|
|
Loading…
Reference in a new issue