Unlock the soundfont earlier after switching preset lists

This commit is contained in:
Chris Robinson
2013-12-23 23:31:47 -08:00
parent a43b296c60
commit c911ca89a3
+1 -2
View File
@@ -289,13 +289,12 @@ AL_API void AL_APIENTRY alSoundfontPresetsSOFT(ALuint id, ALsizei count, const A
presets = ExchangePtr((XchgPtr*)&sfont->Presets, presets);
count = ExchangeInt(&sfont->NumPresets, count);
WriteUnlock(&sfont->Lock);
for(i = 0;i < count;i++)
DecrementRef(&presets[i]->ref);
free(presets);
WriteUnlock(&sfont->Lock);
done:
ALCcontext_DecRef(context);
}