FDS: .dmf wavetables will be 6-bit soon
This commit is contained in:
parent
e1976b96a0
commit
4ba50b433a
|
@ -560,9 +560,12 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
||||||
for (int i=0; i<ds.waveLen; i++) {
|
for (int i=0; i<ds.waveLen; i++) {
|
||||||
DivWavetable* wave=new DivWavetable;
|
DivWavetable* wave=new DivWavetable;
|
||||||
wave->len=(unsigned char)reader.readI();
|
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;
|
wave->max=15;
|
||||||
}
|
}
|
||||||
|
if (ds.system[0]==DIV_SYSTEM_NES_FDS) {
|
||||||
|
wave->max=63;
|
||||||
|
}
|
||||||
if (wave->len>65) {
|
if (wave->len>65) {
|
||||||
logE("invalid wave length %d. are we doing something wrong?\n",wave->len);
|
logE("invalid wave length %d. are we doing something wrong?\n",wave->len);
|
||||||
lastError="file is corrupt or unreadable at wavetables";
|
lastError="file is corrupt or unreadable at wavetables";
|
||||||
|
|
Loading…
Reference in a new issue