Fixed sounds resuming in pause mode while switching between apps

This commit is contained in:
Lwmte 2024-02-09 02:32:09 +01:00
parent 05788b7978
commit acf385693e
2 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,7 @@
Version 1.3.1
=============
Version 1.4
===========
* Fixed sounds resuming in pause mode while switching between apps.
* Ported Winston from TR3 (requires updated TEN Winston wad2).
Version 1.3

View file

@ -7,6 +7,7 @@
#include "Game/camera.h"
#include "Game/collision/collide_room.h"
#include "Game/gui.h"
#include "Game/Lara/lara.h"
#include "Game/room.h"
#include "Game/Setup.h"
@ -15,6 +16,8 @@
#include "Specific/trutils.h"
#include "Specific/winmain.h"
using namespace TEN::Gui;
HSAMPLE BASS_SamplePointer[SOUND_MAX_SAMPLES];
HSTREAM BASS_3D_Mixdown;
HFX BASS_FXHandler[(int)SoundFilter::Count];
@ -338,6 +341,10 @@ void ResumeAllSounds(SoundPauseMode mode)
if (mode == SoundPauseMode::Global)
BASS_Start();
if (g_Gui.GetInventoryMode() == InventoryMode::Pause ||
g_Gui.GetInventoryMode() == InventoryMode::Statistics)
return;
for (const auto& slot : SoundtrackSlot)
{
if ((slot.Channel != NULL) && (BASS_ChannelIsActive(slot.Channel) == BASS_ACTIVE_PAUSED))