diff options
author | Chris Robinson <[email protected]> | 2014-01-17 06:10:29 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-01-17 06:10:29 -0800 |
commit | d387deb3e8b6730668622cd2f8713e2b8a01828d (patch) | |
tree | bc290862b99d27a0c6ad6c9be792c33fd5e620c1 | |
parent | 7206f5873cbb18a17fcbc355b7c01181bf503889 (diff) |
Fix a couple warning messages to show the correct instrument ID
-rw-r--r-- | Alc/midi/sf2load.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 1a5a12cc..70f7b7fc 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -568,7 +568,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->phdr[i].mZoneIdx, sfont->pbag_size); return AL_FALSE; } - if(sfont->phdr[i].mZoneIdx > sfont->phdr[i+1].mZoneIdx) + if(sfont->phdr[i+1].mZoneIdx < sfont->phdr[i].mZoneIdx) { WARN("Preset %d has invalid zone index (%d does not follow %d)\n", i+1, sfont->phdr[i+1].mZoneIdx, sfont->phdr[i].mZoneIdx); @@ -590,7 +590,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->pbag[i].mGenIdx, sfont->pgen_size); return AL_FALSE; } - if(sfont->pbag[i].mGenIdx > sfont->pbag[i+1].mGenIdx) + if(sfont->pbag[i+1].mGenIdx < sfont->pbag[i].mGenIdx) { WARN("Preset zone %d has invalid generator index (%d does not follow %d)\n", i+1, sfont->pbag[i+1].mGenIdx, sfont->pbag[i].mGenIdx); @@ -602,7 +602,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->pbag[i].mModIdx, sfont->pmod_size); return AL_FALSE; } - if(sfont->pbag[i].mModIdx > sfont->pbag[i+1].mModIdx) + if(sfont->pbag[i+1].mModIdx < sfont->pbag[i].mModIdx) { WARN("Preset zone %d has invalid modulator index (%d does not follow %d)\n", i+1, sfont->pbag[i+1].mModIdx, sfont->pbag[i].mModIdx); @@ -627,11 +627,11 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) { if(sfont->inst[i].mZoneIdx >= sfont->ibag_size) { - WARN("Instrument %d has invalid zone index %d (max: %d)\n", i+1, + WARN("Instrument %d has invalid zone index %d (max: %d)\n", i, sfont->inst[i].mZoneIdx, sfont->ibag_size); return AL_FALSE; } - if(sfont->inst[i].mZoneIdx > sfont->inst[i+1].mZoneIdx) + if(sfont->inst[i+1].mZoneIdx < sfont->inst[i].mZoneIdx) { WARN("Instrument %d has invalid zone index (%d does not follow %d)\n", i+1, sfont->inst[i+1].mZoneIdx, sfont->inst[i].mZoneIdx); @@ -640,7 +640,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) } if(sfont->inst[i].mZoneIdx >= sfont->ibag_size) { - WARN("Instrument %d has invalid zone index %d (max: %d)\n", i+1, + WARN("Instrument %d has invalid zone index %d (max: %d)\n", i, sfont->inst[i].mZoneIdx, sfont->ibag_size); return AL_FALSE; } @@ -653,7 +653,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->ibag[i].mGenIdx, sfont->igen_size); return AL_FALSE; } - if(sfont->ibag[i].mGenIdx > sfont->ibag[i+1].mGenIdx) + if(sfont->ibag[i+1].mGenIdx < sfont->ibag[i].mGenIdx) { WARN("Instrument zone %d has invalid generator index (%d does not follow %d)\n", i+1, sfont->ibag[i+1].mGenIdx, sfont->ibag[i].mGenIdx); @@ -665,7 +665,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->ibag[i].mModIdx, sfont->imod_size); return AL_FALSE; } - if(sfont->ibag[i].mModIdx > sfont->ibag[i+1].mModIdx) + if(sfont->ibag[i+1].mModIdx < sfont->ibag[i].mModIdx) { WARN("Instrument zone %d has invalid modulator index (%d does not follow %d)\n", i+1, sfont->ibag[i+1].mModIdx, sfont->ibag[i].mModIdx); |