[Scummvm-git-logs] scummvm master -> c77a18900bd06dc2d9d7a4b2457bdb03ff02b7d5
alxpnv
noreply at scummvm.org
Tue Nov 1 08:53:57 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:
c77a18900b ASYLUM: fix Sound::convertVolumeTo() to match Sound::convertVolumeFrom()
Commit: c77a18900bd06dc2d9d7a4b2457bdb03ff02b7d5
https://github.com/scummvm/scummvm/commit/c77a18900bd06dc2d9d7a4b2457bdb03ff02b7d5
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-11-01T11:57:50+03:00
Commit Message:
ASYLUM: fix Sound::convertVolumeTo() to match Sound::convertVolumeFrom()
Changed paths:
engines/asylum/system/sound.cpp
diff --git a/engines/asylum/system/sound.cpp b/engines/asylum/system/sound.cpp
index 3183e835587..54740a25d61 100644
--- a/engines/asylum/system/sound.cpp
+++ b/engines/asylum/system/sound.cpp
@@ -380,7 +380,7 @@ void Sound::convertVolumeFrom(int32 &vol) {
}
void Sound::convertVolumeTo(int32 &vol) {
- vol = (int32)(log10(vol / (double)Audio::Mixer::kMaxChannelVolume) - 0.5) * 2000;
+ vol = vol ? (int32)log10((vol - 0.5) / Audio::Mixer::kMaxChannelVolume) * 2000 : -9999;
}
void Sound::convertPan(int32 &pan) {
More information about the Scummvm-git-logs
mailing list