[Scummvm-git-logs] scummvm branch-2-6 -> 35408b9a3be3461426a51c87f021ee2eb87a3d3d
alxpnv
noreply at scummvm.org
Tue Jun 14 12:09:03 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
35408b9a3b ASYLUM: fix distorted ambient sounds caused by balance being out of range
Commit: 35408b9a3be3461426a51c87f021ee2eb87a3d3d
https://github.com/scummvm/scummvm/commit/35408b9a3be3461426a51c87f021ee2eb87a3d3d
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-14T15:06:27+03:00
Commit Message:
ASYLUM: fix distorted ambient sounds caused by balance being out of range
Bug #13561
Changed paths:
engines/asylum/system/sound.cpp
diff --git a/engines/asylum/system/sound.cpp b/engines/asylum/system/sound.cpp
index a2680198c66..619c0ff9c51 100644
--- a/engines/asylum/system/sound.cpp
+++ b/engines/asylum/system/sound.cpp
@@ -382,11 +382,9 @@ void Sound::convertPan(int32 &pan) {
int32 p = CLIP<int32>(pan, -10000, 10000);
if (p < 0) {
- pan = (int)(255.0 * pow(10.0, (double)p / 2000.0) + 127.5);
- } else if (p > 0) {
- pan = (int)(255.0 * pow(10.0, (double)p / -2000.0) - 127.5);
+ pan = 129 * (1 - pow(10.0, p / 5000.0));
} else {
- pan = 0;
+ pan = -129 * (1 - pow(10.0, p / -5000.0));
}
}
More information about the Scummvm-git-logs
mailing list