From 3ff33e2f79a7b251ca7709704e995385c792e799 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 2 Jan 2014 09:09:57 -0800 Subject: Update the soundfont preset count after loading a soundfont --- Alc/midi/sf2load.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 43f960c6..30c4c737 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -1340,6 +1340,7 @@ ALboolean loadSf2(Reader *stream, ALsoundfont *soundfont, ALCcontext *context) for(i = 0;i < pids.ids_size;i++) IncrementRef(&presets[i]->ref); presets = ExchangePtr((XchgPtr*)&soundfont->Presets, presets); + ExchangeInt(&soundfont->NumPresets, pids.ids_size); free(presets); } -- cgit v1.2.3