summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-02 11:58:42 +0200
committerSergeanur <s.anureev@yandex.ua>2021-09-02 11:58:42 +0200
commit5aa149f0bc27e1976cb0169e255f42020304d4da (patch)
treeb25d619db63b328d482edd8f71a14fb9590b4f22
parentPS2 mission audio length (diff)
downloadre3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar.gz
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar.bz2
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar.lz
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar.xz
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.tar.zst
re3-5aa149f0bc27e1976cb0169e255f42020304d4da.zip
-rw-r--r--src/audio/AudioLogic.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 4acaa51d..cf4ab286 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -412,14 +412,22 @@ cAudioManager::ProcessReverb()
#endif
}
#else
- // TODO: PS2 code
-
static uint8 OldVolL = 0;
static uint8 OldVolR = 0;
- // SoundDistUp, SoundDistLeft, SoundDistRight used in here from TheCamera
+ uint8 VolL = Min(40, 3 * (20 - TheCamera.SoundDistLeft)) + 20;
+ uint8 VolR = Min(40, 3 * (20 - TheCamera.SoundDistRight)) + 20;
+
+ uint8 VolUp = 5 * (20 - TheCamera.SoundDistUp);
- SampleManager.UpdateReverb();
+ VolL = Min(MAX_VOLUME, VolL + VolUp);
+ VolR = Min(MAX_VOLUME, VolR + VolUp);
+
+ if (OldVolL != VolL || OldVolR != VolR) {
+ SampleManager.UpdateReverb(VolL, VolR, 100, 15, 80);
+ OldVolL = VolL;
+ OldVolR = VolR;
+ }
#endif
}