mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
XM import: use ES5506
This commit is contained in:
parent
12a0e79ef8
commit
22f92113a4
1 changed files with 18 additions and 1 deletions
|
@ -83,6 +83,19 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
|||
|
||||
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("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);
|
||||
|
||||
if (!reader.seek(headerSeek,SEEK_SET)) {
|
||||
|
@ -207,7 +225,6 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
|
|||
}
|
||||
|
||||
// read instruments
|
||||
logV("damn: %x",reader.tell());
|
||||
for (int i=0; i<ds.insLen; i++) {
|
||||
unsigned char volEnv[48];
|
||||
unsigned char panEnv[48];
|
||||
|
|
Loading…
Reference in a new issue