XM import: why does this module have inverted loop
This commit is contained in:
parent
552522e84c
commit
fd253c37f0
|
|
@ -234,6 +234,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
ds.system[i]=DIV_SYSTEM_ES5506;
|
ds.system[i]=DIV_SYSTEM_ES5506;
|
||||||
ds.systemFlags[i].set("amigaVol",true);
|
ds.systemFlags[i].set("amigaVol",true);
|
||||||
ds.systemFlags[i].set("amigaPitch",(ds.linearPitch==0));
|
ds.systemFlags[i].set("amigaPitch",(ds.linearPitch==0));
|
||||||
|
ds.systemFlags[i].set("volScale",3900);
|
||||||
}
|
}
|
||||||
ds.systemLen=(totalChans+31)>>5;
|
ds.systemLen=(totalChans+31)>>5;
|
||||||
|
|
||||||
|
|
@ -546,6 +547,12 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
||||||
s->loopStart=reader.readI();
|
s->loopStart=reader.readI();
|
||||||
s->loopEnd=reader.readI()+s->loopStart;
|
s->loopEnd=reader.readI()+s->loopStart;
|
||||||
|
|
||||||
|
if (s->loopStart>s->loopEnd) {
|
||||||
|
s->loopStart^=s->loopEnd;
|
||||||
|
s->loopEnd^=s->loopStart;
|
||||||
|
s->loopStart^=s->loopEnd;
|
||||||
|
}
|
||||||
|
|
||||||
sampleVol[i][j]=reader.readC();
|
sampleVol[i][j]=reader.readC();
|
||||||
|
|
||||||
signed char fine=reader.readC();
|
signed char fine=reader.readC();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue