summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-21 16:22:02 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-21 16:22:02 +0100
commit1d336d851dd444dba15b4ec4c22fd38e37f5d287 (patch)
treec3bcca1c44b03fa5a9a2ffe7929b2b83a610d69d /src/audio
parentA saner way to remove Stingers, may fix Physical crash (diff)
downloadre3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar.gz
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar.bz2
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar.lz
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar.xz
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.tar.zst
re3-1d336d851dd444dba15b4ec4c22fd38e37f5d287.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/MusicManager.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index f2e3cfd0..1a727b4f 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -1265,7 +1265,8 @@ cMusicManager::DisplayRadioStationName()
if (vehicle)
{
-#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS // Because m_nFrontendTrack can have NO_TRACK
+ // Prev scroll needs it to be signed, and m_nFrontendTrack can be NO_TRACK thus FIX_BUGS
+#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS
int track;
#else
uint8 track;
@@ -1281,13 +1282,16 @@ cMusicManager::DisplayRadioStationName()
#endif
while (track >= NUM_RADIOS + 1) track -= NUM_RADIOS + 1;
- // We already handle this condition while scrolling back, on key press. No need to change this.
+ // On scrolling back we handle this condition on key press. No need to change this.
if (!DMAudio.IsMP3RadioChannelAvailable() && track == USERTRACK)
gNumRetunePresses++;
}
else
+#ifdef RADIO_OFF_TEXT
+ track = GetCarTuning(); // gStreamedSound or veh->m_nRadioStation would also work, but these don't cover police/taxi radios
+#else
track = m_nFrontendTrack;
-
+#endif
wchar* string = nil;
switch (track) {
case WILDSTYLE: string = TheText.Get("FEA_FM0"); break;
@@ -1304,12 +1308,9 @@ cMusicManager::DisplayRadioStationName()
return;
string = TheText.Get("FEA_MP3"); break;
#ifdef RADIO_OFF_TEXT
- case STREAMED_SOUND_RADIO_POLICE:
- case STREAMED_SOUND_RADIO_TAXI:
- return;
- default: {
- // Otherwise pausing-resuming game will show RADIO OFF, since radio isn't set yet
- if (m_nPlayingTrack == NO_TRACK && m_nFrontendTrack == NO_TRACK)
+ case RADIO_OFF: {
+ // Otherwise RADIO OFF will be seen after pausing-resuming game and Mission Complete text
+ if (!m_bRadioStreamReady || !m_bGameplayAllowsRadio)
return;
extern wchar WideErrorString[];
@@ -1321,9 +1322,8 @@ cMusicManager::DisplayRadioStationName()
}
break;
}
-#else
- default: return;
#endif
+ default: return;
};
if (pCurrentStation != string) {