[Scummvm-git-logs] scummvm master -> 2934d8fa4fdb79b4bc38d5d9d2b97f28420fcd07
alxpnv
noreply at scummvm.org
Tue Jun 14 12:32:39 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:
2934d8fa4f ASYLUM: fix distorted ambient sounds caused by balance being out of range
Commit: 2934d8fa4fdb79b4bc38d5d9d2b97f28420fcd07
https://github.com/scummvm/scummvm/commit/2934d8fa4fdb79b4bc38d5d9d2b97f28420fcd07
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-14T15:13:21+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