summaryrefslogtreecommitdiff
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-21 13:02:07 +0300
committerSergeanur <s.anureev@yandex.ua>2021-08-21 13:02:07 +0300
commit7c80093efa18bac0598bf6481ccad479c90e47af (patch)
tree90e77d41de1559f95b068cba3b3f56c187f953d3 /src/audio/AudioManager.cpp
parentfe51abd53420fdeb241c1a733651ea9ec615453a (diff)
Remove cMissionAudio, move cAMCrime array outside of cPoliceRadioQueue (R* vision)
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 2bb17bfb..e42712dc 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -999,7 +999,7 @@ cAudioManager::ProcessActiveQueues()
uint8 emittingVol;
CVector position;
- bool8 missionState;
+ bool8 isPhoneCall;
uint8 channelOffset = 0;
for (int32 i = 0; i < m_nActiveSamples; i++) {
@@ -1065,18 +1065,18 @@ cAudioManager::ProcessActiveQueues()
#endif
emittingVol = m_bDoubleVolume ? 2 * Min(63, vol) : vol;
- missionState = FALSE;
+ isPhoneCall = FALSE;
for (int32 k = 0; k < MISSION_AUDIO_SLOTS; k++) {
- if (m_sMissionAudio.m_bIsMobile[k]) {
- missionState = TRUE;
+ if (m_bIsMissionAudioPhoneCall[k]) {
+ isPhoneCall = TRUE;
break;
}
}
- if (missionState) {
- emittingVol = (emittingVol * field_5538) / 127;
+ if (isPhoneCall) {
+ emittingVol = (emittingVol * m_nGlobalSfxVolumeMultiplier) / 127;
} else {
- if (field_5538 < 127)
- emittingVol = (emittingVol * field_5538) / 127;
+ if (m_nGlobalSfxVolumeMultiplier < 127)
+ emittingVol = (emittingVol * m_nGlobalSfxVolumeMultiplier) / 127;
}
#ifdef EXTERNAL_3D_SOUND
@@ -1154,19 +1154,19 @@ cAudioManager::ProcessActiveQueues()
if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) {
#endif
SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency);
- bool8 isMobile = FALSE;
+ isPhoneCall = FALSE;
for (int32 l = 0; l < MISSION_AUDIO_SLOTS; l++) {
- if (m_sMissionAudio.m_bIsMobile[l]) {
- isMobile = TRUE;
+ if (m_bIsMissionAudioPhoneCall[l]) {
+ isPhoneCall = TRUE;
break;
}
}
- if (!isMobile || m_asActiveSamples[k].m_bIs2D) {
- if (field_5538 < 127)
- emittingVol *= field_5538 / 127;
+ if (!isPhoneCall || m_asActiveSamples[k].m_bIs2D) {
+ if (m_nGlobalSfxVolumeMultiplier < 127)
+ emittingVol = (emittingVol * m_nGlobalSfxVolumeMultiplier) / 127;
vol = emittingVol;
} else {
- vol = (emittingVol * field_5538 / 127);
+ vol = (emittingVol * m_nGlobalSfxVolumeMultiplier) / 127;
}
#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(k, vol);