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

athrxx athrxx at scummvm.org
Thu Apr 29 22:33:31 UTC 2021


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:
da4985a76a KYRA: fix bug no. 12472 (Incorrect some sounds in game)


Commit: da4985a76a98d453e1e3ba2a499fc46ad82243a2
    https://github.com/scummvm/scummvm/commit/da4985a76a98d453e1e3ba2a499fc46ad82243a2
Author: athrxx (athrxx at scummvm.org)
Date: 2021-04-30T00:32:31+02:00

Commit Message:
KYRA: fix bug no. 12472 (Incorrect some sounds in game)

(regression from 78cde14d)

Changed paths:
    engines/kyra/sound/drivers/adlib.cpp


diff --git a/engines/kyra/sound/drivers/adlib.cpp b/engines/kyra/sound/drivers/adlib.cpp
index f1f998b19d..1b163afb78 100644
--- a/engines/kyra/sound/drivers/adlib.cpp
+++ b/engines/kyra/sound/drivers/adlib.cpp
@@ -935,12 +935,9 @@ void AdLibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) {
 		}
 	}
 
-	// Shift octave to correct bit position and limit to valid range.
-	octave = CLIP<int8>(octave, 0, 7) << 2;
-
 	// Update octave & frequency, but keep on/off state.
 	channel.regAx = freq & 0xFF;
-	channel.regBx = (channel.regBx & 0x20) | octave | ((freq >> 8) & 0x03);
+	channel.regBx = (channel.regBx & 0x20) | (octave << 2) | ((freq >> 8) & 0x03);
 
 	writeOPL(0xA0 + _curChannel, channel.regAx);
 	writeOPL(0xB0 + _curChannel, channel.regBx);




More information about the Scummvm-git-logs mailing list