From 5cdd6a16b209bfd1c23b938fb33971ae606323a1 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Thu, 6 Dec 2018 08:20:18 -0500
Subject: [PATCH] Attempt to stop music before wipe (doesn't work?!)

---
 src/f_wipe.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/f_wipe.c b/src/f_wipe.c
index 2ded899de..137ba161f 100644
--- a/src/f_wipe.c
+++ b/src/f_wipe.c
@@ -342,12 +342,15 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
 	fademask_t *fmask;
 
 #ifdef _WINDOWS
-	boolean waspaused = false;
 	// DD HACK: Music doesn't work during wipes, so halt it before the wipe starts
-	if (S_MusicPlaying() && !S_MusicPaused())
+	boolean wasplaying = false;
+	char musname[7]; UINT16 flags; boolean looping;
+
+	S_MusicInfo(musname, &flags, &looping);
+	if (S_MusicPlaying())
 	{
-		S_PauseAudio();
-		waspaused = true;
+		S_StopMusic();
+		wasplaying = true;
 	}
 #endif
 
@@ -392,8 +395,8 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
 
 #ifdef _WINDOWS
 	// DD HACK: Music doesn't work during wipes, so resume it after the wipe ends
-	if (waspaused)
-		S_ResumeAudio();
+	if (wasplaying)
+		S_ChangeMusic(musname, flags, looping);
 #endif
 #endif
 }
-- 
GitLab