From 393dfb0b7c7ebd447aa721a4e0ae3a2b315f899b Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 4 Feb 2017 16:41:34 +0100 Subject: [PATCH] Stop all sounds with a fade when the phase is not play --- event.cpp | 4 ++++ sound.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/event.cpp b/event.cpp index fc5f173..583149a 100644 --- a/event.cpp +++ b/event.cpp @@ -2843,6 +2843,10 @@ bool CEvent::ChangePhase(UINT phase) GetPhysicalWorld(), 0, 0); // écrit le monde } + // FIXME: pause is better if the game is not stop but just interrupted + if (m_phase == WM_PHASE_PLAY && m_phase != phase) + m_pSound->StopAllSounds (); + m_phase = phase; // change de phase m_index = index; diff --git a/sound.h b/sound.h index ece5af8..2c6e89d 100644 --- a/sound.h +++ b/sound.h @@ -42,8 +42,6 @@ public: bool IsPlayingMusic(); void AdaptVolumeMusic(); void SetSuspendSkip(int nb); - -protected: bool StopAllSounds(); protected: