aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/fluidsynth.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/midi/fluidsynth.c')
-rw-r--r--Alc/midi/fluidsynth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c
index 25b367af..f5074d6d 100644
--- a/Alc/midi/fluidsynth.c
+++ b/Alc/midi/fluidsynth.c
@@ -447,6 +447,11 @@ static ALenum FSynth_selectSoundfonts(FSynth *self, ALCdevice *device, ALsizei c
ret = MidiSynth_selectSoundfonts(STATIC_CAST(MidiSynth, self), device, count, ids);
if(ret != AL_NO_ERROR) return ret;
+ ALCdevice_Lock(device);
+ for(i = 0;i < 16;i++)
+ fluid_synth_all_sounds_off(self->Synth, i);
+ ALCdevice_Unlock(device);
+
fontid = malloc(count * sizeof(fontid[0]));
if(fontid)
{
@@ -695,4 +700,4 @@ MidiSynth *FSynth_create(ALCdevice* UNUSED(device))
return NULL;
}
-#endif \ No newline at end of file
+#endif