[Scummvm-cvs-logs] scummvm master -> 190ec9c2b64c940272d2f3e207296ce3eaab043f

lordhoto lordhoto at gmail.com
Sat Jun 8 17:18:42 CEST 2013


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c3de517fb4 VIDEO: Wrap 8-bit smacker audio properly
190ec9c2b6 Merge pull request #336 from madmoose/smacker-8-bit-audio-fix


Commit: c3de517fb427c681415680daa0e3c5b4f087e095
    https://github.com/scummvm/scummvm/commit/c3de517fb427c681415680daa0e3c5b4f087e095
Author: Thomas Fach-Pedersen (thomas at fach-pedersen.net)
Date: 2013-05-27T15:58:10-07:00

Commit Message:
VIDEO: Wrap 8-bit smacker audio properly

The accumulator 'bases' is 16-bit but when used in 8-bit audio we need to
wrap as if 'bases' is 8-bit. Clipping on output is no longer required.

This fixes noise in The Neverhood's in-game "making of" videos,
particularly the section called "Construction, powertools & painting",
hash 0x21080009.

The intro video in The Neverhood is 16-bit audio and was not affected by
this bug. No other videos or games have been tested.

Changed paths:
    video/smk_decoder.cpp



diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 4e18268..b622a0a 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -821,8 +821,9 @@ void SmackerDecoder::SmackerAudioTrack::queueCompressedBuffer(byte *buffer, uint
 		// (the exact opposite to the base values)
 		if (!is16Bits) {
 			for (int k = 0; k < (isStereo ? 2 : 1); k++) {
-				bases[k] += (int8) ((int16) audioTrees[k]->getCode(audioBS));
-				*curPointer++ = CLIP<int>(bases[k], 0, 255) ^ 0x80;
+				int8 delta = (int8) ((int16) audioTrees[k]->getCode(audioBS));
+				bases[k] = (bases[k] + delta) & 0xFF;
+				*curPointer++ = bases[k] ^ 0x80;
 				curPos++;
 			}
 		} else {


Commit: 190ec9c2b64c940272d2f3e207296ce3eaab043f
    https://github.com/scummvm/scummvm/commit/190ec9c2b64c940272d2f3e207296ce3eaab043f
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2013-06-08T08:17:51-07:00

Commit Message:
Merge pull request #336 from madmoose/smacker-8-bit-audio-fix

VIDEO: Wrap 8-bit smacker audio properly

Changed paths:
    video/smk_decoder.cpp









More information about the Scummvm-git-logs mailing list