From: fgsfds Date: Mon, 2 Sep 2019 17:41:56 +0000 (+0300) Subject: Sound: FluidSynth: Stop the player before freeing X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4c631bfacf36675aee335a5c0910a754beb73e1d;p=d2df-sdl.git Sound: FluidSynth: Stop the player before freeing --- diff --git a/src/engine/e_soundfile_fluid.pas b/src/engine/e_soundfile_fluid.pas index da79055..c958c7b 100644 --- a/src/engine/e_soundfile_fluid.pas +++ b/src/engine/e_soundfile_fluid.pas @@ -224,7 +224,11 @@ end; procedure TFluidLoader.Free(); begin - if FPlayer <> nil then delete_fluid_player(FPlayer); + if FPlayer <> nil then + begin + fluid_player_stop(FPlayer); + delete_fluid_player(FPlayer); + end; if FSynth <> nil then delete_fluid_synth(FSynth); FPlayer := nil; FSynth := nil;