From e6e7e461c092bb2aa3211910a6eadf1472c07f1d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 3 Jan 2014 18:48:47 -0800 Subject: Avoid using alFontsoundiSOFT when loading a soundfont This should now make the soundfont loader thread-safe. --- Alc/midi/sf2load.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc') diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 169261d8..e662bd90 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -713,7 +713,7 @@ static ALboolean ensureZoneSanity(const GenModList *zone, int splidx) return AL_TRUE; } -static void fillZone(ALfontsound *sound, const GenModList *zone) +static void fillZone(ALfontsound *sound, ALCcontext *context, const GenModList *zone) { static const ALenum Gen2Param[60] = { 0, /* 0 - startAddrOffset */ @@ -833,7 +833,7 @@ static void fillZone(ALfontsound *sound, const GenModList *zone) if(!(value == 0 || value == 1 || value == 3)) value = 0; } - alFontsoundiSOFT(sound->id, param, value); + ALfontsound_setPropi(sound, context, param, value); } else if(gen->mGenerator < 256) { @@ -944,7 +944,7 @@ static void processInstrument(ALfontsound ***sounds, ALsizei *sounds_size, ALCco (*sounds)[*sounds_size]->PitchKey = samp->mOriginalKey; (*sounds)[*sounds_size]->PitchCorrection = samp->mCorrection; (*sounds)[*sounds_size]->LoopMode = (samp->mSampleType&0x7ffff); - fillZone((*sounds)[*sounds_size], &lzone); + fillZone((*sounds)[*sounds_size], context, &lzone); (*sounds_size)++; break; -- cgit v1.2.3