[Scummvm-git-logs] scummvm master -> ad63aaef904ee30209ae9d522c4f4d8c0ef59292

athrxx noreply at scummvm.org
Fri Sep 13 21:32:24 UTC 2024


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:
ad63aaef90 SCI: (PCJr sound driver) - minor bug fix


Commit: ad63aaef904ee30209ae9d522c4f4d8c0ef59292
    https://github.com/scummvm/scummvm/commit/ad63aaef904ee30209ae9d522c4f4d8c0ef59292
Author: athrxx (athrxx at scummvm.org)
Date: 2024-09-13T23:31:50+02:00

Commit Message:
SCI: (PCJr sound driver) - minor bug fix

Individual short notes are now better perceptible, e. g. in the LSL3 fanfare.

Changed paths:
    engines/sci/sound/drivers/pcjr.cpp


diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 948c835f136..9f08cfb14de 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -296,7 +296,11 @@ void SoundChannel_PCJr_SCI0::envAT() {
 		_envCount2 = 20;
 		envST();
 	} else {
-		_envVolume = _envAttn = envTable[c];
+		// The original makes a signed check whether the table value is negative. If negative, it will put
+		// zero, if zero or positive it will put the table value. Since the table is all zero or negative,
+		// it will always be zero. This is weird, but just just be the remainder of a sloppy bug fix. If
+		// we put the table value instead of zero, e. g. the LSL3 opening fanfare will sound wrong.
+		_envVolume = _envAttn = 0;
 		updateChannelVolume();
 	}
 }




More information about the Scummvm-git-logs mailing list