FDS: .dmf wavetables will be 6-bit soon

This commit is contained in:
tildearrow 2022-04-05 15:14:48 -05:00
parent e1976b96a0
commit 4ba50b433a

View file

@ -560,9 +560,12 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
for (int i=0; i<ds.waveLen; i++) {
DivWavetable* wave=new DivWavetable;
wave->len=(unsigned char)reader.readI();
if (ds.system[0]==DIV_SYSTEM_GB || ds.system[0]==DIV_SYSTEM_NES_FDS) {
if (ds.system[0]==DIV_SYSTEM_GB) {
wave->max=15;
}
if (ds.system[0]==DIV_SYSTEM_NES_FDS) {
wave->max=63;
}
if (wave->len>65) {
logE("invalid wave length %d. are we doing something wrong?\n",wave->len);
lastError="file is corrupt or unreadable at wavetables";