summaryrefslogtreecommitdiff
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-02 12:58:42 +0300
committerSergeanur <s.anureev@yandex.ua>2021-09-02 12:58:42 +0300
commit5aa149f0bc27e1976cb0169e255f42020304d4da (patch)
treeb25d619db63b328d482edd8f71a14fb9590b4f22 /src/audio/AudioLogic.cpp
parent8c1f1cc7b8b9f736a5d963524e555561d6cf6450 (diff)
PS2 ProcessReverb
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-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
}