mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- hopefully fixed the MUS precaching for good.
According to blzut3, it looks like it is a byte followed by a variable length field. It can be any value 0-15 and will be followed by that many bytes one for each bank used. If the bank count is 0 then it is shorthand for using one bank (bank 0).
This commit is contained in:
parent
be6daf5d78
commit
3c40d71c20
2 changed files with 14 additions and 14 deletions
|
@ -228,19 +228,19 @@ void MUSSong2::Precache()
|
|||
val = instr - 100 + (1 << 14);
|
||||
}
|
||||
|
||||
BYTE moreparam = used[k++];
|
||||
if (moreparam == 1)
|
||||
int numbanks = used[k++];
|
||||
if (numbanks > 0)
|
||||
{
|
||||
BYTE bank = used[k++];
|
||||
val |= (bank << 7);
|
||||
}
|
||||
else if (moreparam > 0)
|
||||
for (int b = 0; b < numbanks; b++)
|
||||
{
|
||||
// No information if this is even valid. Print a message so it can be investigated later
|
||||
Printf("Unknown instrument data found in music\n");
|
||||
work[j++] = val | used[k++];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
work[j++] = val;
|
||||
}
|
||||
}
|
||||
MIDI->PrecacheInstruments(&work[0], j);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue