[Scummvm-git-logs] scummvm master -> 51ffd1d249f908aad74ace961691d19df0f5b705

AndywinXp noreply at scummvm.org
Sat Apr 27 21:31:11 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:
51ffd1d249 SWORD1: SOUND: Force alignment on odd-sized samples


Commit: 51ffd1d249f908aad74ace961691d19df0f5b705
    https://github.com/scummvm/scummvm/commit/51ffd1d249f908aad74ace961691d19df0f5b705
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-04-27T23:31:06+02:00

Commit Message:
SWORD1: SOUND: Force alignment on odd-sized samples

This fixes #15094.

Changed paths:
    engines/sword1/sound.cpp


diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 16c01c1c06b..0dc64713483 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -427,6 +427,11 @@ void Sound::startSpeech(uint16 roomNo, uint16 localNo) {
 
 			_cowFile.read(compSample, sampleFileSize);
 			_speechSize = getSpeechSize(compSample, sampleFileSize);
+
+			// Force alignment on sample size (bug #15094)...
+			if ((_speechSize % 2) != 0)
+				_speechSize += 1;
+
 			_speechSample = (byte *)malloc(_speechSize);
 
 			if (_speechSample) {




More information about the Scummvm-git-logs mailing list