summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-02 11:43:15 +0200
committerSergeanur <s.anureev@yandex.ua>2021-09-02 11:43:15 +0200
commit8c1f1cc7b8b9f736a5d963524e555561d6cf6450 (patch)
tree29ac8dc1f0665ee43f8793828b2f3121b4216d65 /src/audio/AudioLogic.cpp
parentAudio: PS2 cAudioManager::ServicePoliceRadioChannel (diff)
downloadre3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar.gz
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar.bz2
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar.lz
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar.xz
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.tar.zst
re3-8c1f1cc7b8b9f736a5d963524e555561d6cf6450.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 4b232126..4acaa51d 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -8756,8 +8756,13 @@ cAudioManager::PreloadMissionAudio(Const char *name)
m_nMissionAudioLoadingStatus = LOADING_STATUS_NOT_LOADED;
m_nMissionAudioPlayStatus = PLAY_STATUS_STOPPED;
m_bIsMissionAudioPlaying = FALSE;
+#ifdef GTA_PS2
+ m_nMissionAudioFramesToPlay = m_nTimeSpent * SampleManager.GetSampleLength(missionAudioSfx) / SampleManager.GetSampleBaseFrequency(missionAudioSfx);
+ m_nMissionAudioFramesToPlay = 11 * m_nMissionAudioFramesToPlay / 10;
+#else
m_nMissionAudioFramesToPlay = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_nMissionAudioFramesToPlay *= 4;
+#endif
m_bIsMissionAudioAllowedToPlay = FALSE;
m_bIsMissionAudio2D = TRUE;
g_bMissionAudioLoadFailed = FALSE;