aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi
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
parent355b8db9152b9b4c88d3d01c79e0fdc21a2d623f (diff)
Update some trace messages to be more useful
Diffstat (limited to 'Alc/midi')
-rw-r--r--Alc/midi/base.c4
-rw-r--r--Alc/midi/sf2load.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c
index 9e778a45..2ebb24e1 100644
--- a/Alc/midi/base.c
+++ b/Alc/midi/base.c
@@ -172,14 +172,14 @@ ALsoundfont *MidiSynth_getDefSoundfont(ALCcontext *context)
f = fopen(fname, "rb");
if(f == NULL)
- ERR("Failed to open default soundfont %s\n", fname);
+ ERR("Failed to open %s\n", fname);
else
{
Reader reader;
reader.cb = read_file;
reader.ptr = f;
reader.error = 0;
- TRACE("Loading default soundfont %s\n", fname);
+ TRACE("Loading %s\n", fname);
loadSf2(&reader, device->DefaultSfont, context);
fclose(f);
}
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);