summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-30 20:36:11 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-30 20:36:11 +0200
commita3964dfd4a6d84aded126f0314498b0da0aaf93a (patch)
treea9e14506e259998e4807fa80cee0f4f5e2db2fea /src/audio
parentfix some string sizes to be MAX_PATH (diff)
downloadre3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar.gz
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar.bz2
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar.lz
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar.xz
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.tar.zst
re3-a3964dfd4a6d84aded126f0314498b0da0aaf93a.zip
Diffstat (limited to 'src/audio')
-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 957fce55..cb441622 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -306,7 +306,16 @@ cMusicManager::ChangeMusicMode(uint8 mode)
uint8 mode2;
switch (mode)
{
- case MUSICMODE_FRONTEND: mode2 = MUSICMODE_FRONTEND; break;
+ case MUSICMODE_FRONTEND:
+ mode2 = 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_LUIGI1_LG; i++) {
+ m_aTracks[i].m_nPosition = GetTrackStartPos(i);
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+#endif
+ break;
case MUSICMODE_GAME: mode2 = MUSICMODE_GAME; break;
case MUSICMODE_CUTSCENE: mode2 = MUSICMODE_CUTSCENE; break;
case MUSICMODE_DISABLE: mode2 = MUSICMODE_DISABLED; break;
@@ -448,6 +457,12 @@ cMusicManager::Service()
void
cMusicManager::ServiceFrontEndMode()
{
+#ifdef PAUSE_RADIO_IN_FRONTEND
+ // pause radio
+ for (uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_LUIGI1_LG; i++)
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+#endif
+
if (m_nNextTrack < TOTAL_STREAMED_SOUNDS) {
if (m_bFrontendTrackFinished) {
if (!SampleManager.IsStreamPlaying()) {