aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/sf2load.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-03 23:19:52 -0800
committerChris Robinson <[email protected]>2014-01-03 23:19:52 -0800
commit2dd87946fd261d3960deac74420dc1860e19ae8e (patch)
tree70b860c55e5061e81dc21633eaf0b59d35d57ecc /Alc/midi/sf2load.c
parent355b8db9152b9b4c88d3d01c79e0fdc21a2d623f (diff)
Update some trace messages to be more useful
Diffstat (limited to 'Alc/midi/sf2load.c')
-rw-r--r--Alc/midi/sf2load.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c
index e662bd90..a27bf624 100644
--- a/Alc/midi/sf2load.c
+++ b/Alc/midi/sf2load.c
@@ -688,7 +688,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont)
return AL_TRUE;
}
-static ALboolean ensureZoneSanity(const GenModList *zone, int splidx)
+static ALboolean ensureZoneSanity(const GenModList *zone, int instidx, int zoneidx, int splidx)
{
ALsizei i;
@@ -701,9 +701,10 @@ static ALboolean ensureZoneSanity(const GenModList *zone, int splidx)
if(!(low >= 0 && low <= 127 && low >= 0 && low <= 127 && high >= low))
{
- TRACE("Skipping sample %d with invalid %s range: %d...%d\n", splidx,
+ TRACE("Instrument %d zone %d sample %d, invalid %s range: %d...%d\n",
+ instidx, zoneidx, splidx,
(zone->gens[i].mGenerator == 43) ? "key" :
- (zone->gens[i].mGenerator == 44) ? "velocity" : "(unknown)",
+ (zone->gens[i].mGenerator == 44) ? "vel" : "(unk)",
low, high);
return AL_FALSE;
}
@@ -932,7 +933,7 @@ static void processInstrument(ALfontsound ***sounds, ALsizei *sounds_size, ALCco
for(;mod != mod_end;mod++)
GenModList_accumMod(&lzone, mod);
- if(!ensureZoneSanity(&lzone, samp-sfont->shdr))
+ if(!ensureZoneSanity(&lzone, inst-sfont->inst, zone-sfont->ibag, samp-sfont->shdr))
break;
(*sounds)[*sounds_size] = NewFontsound(context);