foxygit / doom Log in
commit 5ad26cb5c8893882f5982cd7aa614220f8a1f872
Author:     Roman Fomin <rfomin@gmail.com>
AuthorDate: Mon Jul 3 15:05:16 2023 +0700
Commit:     GitHub <noreply@github.com>
CommitDate: Mon Jul 3 10:05:16 2023 +0200

    Implement pause in a different way in Fluidsynth music module (#1605)

    Since the behavior of fluid_player_stop() and fluid_player_play() has been
    changed in Fluidsynth 2.3.3, use Mix_HookMusic() to pause as it's probably the
    better way.
---
 src/i_flmusic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/i_flmusic.c b/src/i_flmusic.c
index dae71803..7ea7653d 100644
--- a/src/i_flmusic.c
+++ b/src/i_flmusic.c
@@ -161,7 +161,7 @@ static void I_FL_PauseSong(void)
 {
     if (player)
     {
-        fluid_player_stop(player);
+        Mix_HookMusic(NULL, NULL);
     }
 }

@@ -169,7 +169,7 @@ static void I_FL_ResumeSong(void)
 {
     if (player)
     {
-        fluid_player_play(player);
+        Mix_HookMusic(FL_Mix_Callback, NULL);
     }
 }