[Scummvm-git-logs] scummvm master -> 5bbd5996a631fadde8477a28eb97246d88623b06

eriktorbjorn noreply at scummvm.org
Tue Jun 17 17:03:36 UTC 2025


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

Summary:
5bbd5996a6 AWE: Go back to playing the whole raw sound, until someone fixes looping


Commit: 5bbd5996a631fadde8477a28eb97246d88623b06
    https://github.com/scummvm/scummvm/commit/5bbd5996a631fadde8477a28eb97246d88623b06
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-06-17T19:02:39+02:00

Commit Message:
AWE: Go back to playing the whole raw sound, until someone fixes looping

See bug #16015 for an example of looping sounds.

Changed paths:
    engines/awe/sound.cpp


diff --git a/engines/awe/sound.cpp b/engines/awe/sound.cpp
index 06e005d9f3c..1b152658594 100644
--- a/engines/awe/sound.cpp
+++ b/engines/awe/sound.cpp
@@ -65,15 +65,12 @@ void Sound::playSoundRaw(byte channel, const byte *data, size_t size,
 		int freq, byte volume) {
 	assert(channel < MAX_CHANNELS);
 
-	uint length = READ_BE_UINT16(data) * 2;
-
-	if (length > size - 8) {
-		warning("playSoundRaw: Length %d exceeds resource data length %ld", length, size);
-		length = size - 8;
-	}
+	// Used for looping sounds, e.g. the waterfall
+	// uint16 length = READ_BE_UINT16(data) * 2;
+	// uint16 loopLength = READ_BE_UINT16(data + 2) * 2;
 
 	Common::MemoryReadStream *stream =
-		new Common::MemoryReadStream(data + 8, length);
+		new Common::MemoryReadStream(data + 8, size - 8);
 	Audio::AudioStream *sound =
 		Audio::makeRawStream(stream, freq,
 			0,




More information about the Scummvm-git-logs mailing list