summaryrefslogtreecommitdiffstats
path: root/src/audio/MusicManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-30 20:26:36 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-30 20:26:36 +0200
commit138abb91f6232ef40e1093b3c37122e1b0bf2cf1 (patch)
treec4c694734bb56c29ddf8b5bbd891741540a7c68b /src/audio/MusicManager.cpp
parentFix script load (diff)
parentPause radio when game is paused (diff)
downloadre3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.gz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.bz2
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.lz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.xz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.zst
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.zip
Diffstat (limited to 'src/audio/MusicManager.cpp')
-rw-r--r--src/audio/MusicManager.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index dad45371..9032a8e7 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -310,7 +310,16 @@ cMusicManager::ChangeMusicMode(uint8 mode)
switch (mode)
{
- case MUSICMODE_FRONTEND: m_nUpcomingMusicMode = MUSICMODE_FRONTEND; break;
+ case MUSICMODE_FRONTEND:
+ m_nUpcomingMusicMode = MUSICMODE_FRONTEND;
+
+#ifdef PAUSE_RADIO_IN_FRONTEND
+ // rewind those streams we weren't listening right now
+ for( uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_BIKER; i++ )
+ m_aTracks[i].m_nPosition = GetTrackStartPos(i);
+#endif
+
+ break;
case MUSICMODE_GAME: m_nUpcomingMusicMode = MUSICMODE_GAME; break;
case MUSICMODE_CUTSCENE:
m_nUpcomingMusicMode = MUSICMODE_CUTSCENE;
@@ -414,6 +423,12 @@ cMusicManager::ServiceFrontEndMode()
{
static bool8 bRadioStatsRecorded = FALSE;
+#ifdef PAUSE_RADIO_IN_FRONTEND
+ // pause radio
+ for( uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_BIKER; i++ )
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+#endif
+
if (m_bAnnouncementInProgress) {
SampleManager.StopStreamedFile();
if (SampleManager.IsStreamPlaying())