diff --git a/src/f_wipe.c b/src/f_wipe.c index 95dd5bbdef8c386727f0df4f6e641b6885129774..2ded899de8b83aeb4c408f5d7d6ec664264e0c9b 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -27,6 +27,10 @@ #include "d_main.h" #include "m_misc.h" // movie mode +#ifdef _WINDOWS +#include "s_sound.h" // DD music hack +#endif + #ifdef HWRENDER #include "hardware/hw_main.h" #endif @@ -337,6 +341,16 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) UINT8 wipeframe = 0; 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()) + { + S_PauseAudio(); + waspaused = true; + } +#endif + paldiv = FixedDiv(257<<FRACBITS, 11<<FRACBITS); // Init the wipe @@ -375,5 +389,11 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) M_SaveFrame(); } WipeInAction = false; + +#ifdef _WINDOWS + // DD HACK: Music doesn't work during wipes, so resume it after the wipe ends + if (waspaused) + S_ResumeAudio(); +#endif #endif } diff --git a/src/p_setup.c b/src/p_setup.c index 93eb755831b0f3eac78484c2f44edb25beb6a974..224f9c682d67767bdad949a99812b4cc9a91f2fa 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2712,6 +2712,11 @@ boolean P_SetupLevel(boolean skipprecip) tic_t endtime = starttime + (3*TICRATE)/2; tic_t nowtime; +#if defined(_WINDOWS) + // DD hack: Music doesn't work when wiping. + // Stop music now because we do a second wipe after a delay + S_StopMusic(); +#endif S_StartSound(NULL, sfx_s3kaf); F_WipeStartScreen();