From c06bb88756b60b5d1fe7b9c30d629bad75a6f68b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 30 Jun 2014 04:03:50 -0700 Subject: Warn about all unhandled soundfont generators --- Alc/midi/sf2load.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc/midi') diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index f0beeabe..b32319b3 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -848,12 +848,12 @@ static void fillZone(ALfontsound *sound, ALCcontext *context, const GenModList * value = getLoopMode(value); ALfontsound_setPropi(sound, context, param, value); } - else if(gen->mGenerator < 256) + else { - static ALboolean warned[256]; - if(!warned[gen->mGenerator]) + static ALuint warned[65536/32]; + if(!(warned[gen->mGenerator/32]&(1<<(gen->mGenerator&31)))) { - warned[gen->mGenerator] = AL_TRUE; + warned[gen->mGenerator/32] |= 1<<(gen->mGenerator&31); ERR("Unhandled generator %d\n", gen->mGenerator); } } -- cgit v1.2.3