diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-06-08 16:32:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 16:32:57 +0200 |
commit | 85d845c5ce5b004ef0a005652ebcdb82b1143579 (patch) | |
tree | a8e4ec80bc8ecf056616dda057fd96fb635273e1 /src/audio/MusicManager.cpp | |
parent | bla (diff) | |
parent | fixes (diff) | |
download | re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar.gz re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar.bz2 re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar.lz re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar.xz re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.tar.zst re3-85d845c5ce5b004ef0a005652ebcdb82b1143579.zip |
Diffstat (limited to 'src/audio/MusicManager.cpp')
-rw-r--r-- | src/audio/MusicManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index ca253fba..9fb1991e 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -524,7 +524,7 @@ cMusicManager::ServiceGameMode() } else if (dist >= 100.0f) { int8 volume = ((45.0f - (Sqrt(dist) - 10.0f)) / 45.0f * 100.0f); int8 pan; - if (AudioManager.IsMissionAudioSamplePlaying()) + if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) volume /= 4; if (volume != 0) { CVector trVec; @@ -536,7 +536,7 @@ cMusicManager::ServiceGameMode() if (gRetuneCounter) volume /= 4; SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0); - } else if (AudioManager.IsMissionAudioSamplePlaying()) { + } else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) { SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0); } else if (gRetuneCounter) { SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0); @@ -544,7 +544,7 @@ cMusicManager::ServiceGameMode() SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0); } } - } else if (AudioManager.IsMissionAudioSamplePlaying()) { + } else if (AudioManager.ShouldDuckMissionAudio(0) || AudioManager.ShouldDuckMissionAudio(1)) { SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0); nFramesSinceCutsceneEnded = 0; } else { @@ -830,7 +830,7 @@ cMusicManager::ServiceAnnouncement() SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0); if (SampleManager.StartStreamedFile(m_nAnnouncement, 0, 0)) { - SampleManager.SetStreamedVolumeAndPan(AudioManager.IsMissionAudioSamplePlaying() ? 25 : 100, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan((AudioManager.IsMissionAudioSamplePlaying(0) || AudioManager.IsMissionAudioSamplePlaying(1)) ? 25 : 100, 63, 0, 0); m_bAnnouncementInProgress = true; m_nPreviousStreamedSound = m_nCurrentStreamedSound; m_nCurrentStreamedSound = m_nAnnouncement; @@ -903,7 +903,7 @@ cMusicManager::ChangeRadioChannel() return false; if (!SampleManager.StartStreamedFile(m_nCurrentStreamedSound, GetTrackStartPos(m_nCurrentStreamedSound), 0)) return false; - SampleManager.SetStreamedVolumeAndPan(AudioManager.IsMissionAudioSamplePlaying() ? 25 : 100, 63, 0, 0); + SampleManager.SetStreamedVolumeAndPan((AudioManager.IsMissionAudioSamplePlaying(0) || AudioManager.IsMissionAudioSamplePlaying(1)) ? 25 : 100, 63, 0, 0); } return true; } |