DEADSOFTWARE

Sound: FluidSynth: Stop the player before freeing
authorfgsfds <pvt.fgsfds@gmail.com>
Mon, 2 Sep 2019 17:41:56 +0000 (20:41 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Mon, 2 Sep 2019 17:41:56 +0000 (20:41 +0300)
src/engine/e_soundfile_fluid.pas

index da79055db8e9d30ffabfc3e5eb9fcfbb74be978c..c958c7b86473220dc30b38a356aa396bf90d9d2b 100644 (file)
@@ -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;