Skip to content

Commit

Permalink
- fixed: when deactivating the app, pausing the sound system should n…
Browse files Browse the repository at this point in the history
…ot depend on the game's internal pause state.

All this tells is that the gameplay was halted. Sound was not stopped when the user either minimized or tabbed away in the in-game menu.

This commit had to be reapplied because it got lost in a backend update.
  • Loading branch information
coelckers committed Dec 18, 2022
1 parent e75448b commit a9ad2a3
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions source/common/audio/sound/s_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,26 +1824,20 @@ void S_SetSoundPaused(int state)

if ((state || i_soundinbackground) && !pauseext)
{
if (paused == 0)
S_ResumeSound(true);
if (GSnd != nullptr)
{
S_ResumeSound(true);
if (GSnd != nullptr)
{
GSnd->SetInactive(SoundRenderer::INACTIVE_Active);
}
GSnd->SetInactive(SoundRenderer::INACTIVE_Active);
}
}
else
{
if (paused == 0)
S_PauseSound(false, true);
if (GSnd != nullptr)
{
S_PauseSound(false, true);
if (GSnd != nullptr)
{
GSnd->SetInactive(gamestate == GS_LEVEL || gamestate == GS_TITLELEVEL ?
SoundRenderer::INACTIVE_Complete :
SoundRenderer::INACTIVE_Mute);
}
GSnd->SetInactive(gamestate == GS_LEVEL || gamestate == GS_TITLELEVEL ?
SoundRenderer::INACTIVE_Complete :
SoundRenderer::INACTIVE_Mute);
}
}
}
Expand Down

0 comments on commit a9ad2a3

Please sign in to comment.