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

dwatteau noreply at scummvm.org
Thu Mar 26 15:35:17 UTC 2026


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:
ab3b59a2e2 SWORD1: Fix wrong samplerate when playing WAVE music on big-endian hosts


Commit: ab3b59a2e2f37d107fb03d59fb354ad728b8de87
    https://github.com/scummvm/scummvm/commit/ab3b59a2e2f37d107fb03d59fb354ad728b8de87
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2026-03-26T16:33:52+01:00

Commit Message:
SWORD1: Fix wrong samplerate when playing WAVE music on big-endian hosts

This is related to the WaveHeader struct being read in native endianness,
so its dwSamplesPerSec field has to be swapped on big-endian hosts.

Reported by user maht on Discord, while playing a WAVE release on PS3.

Similar to commit 1127bc46263e9ca43cc68990283ba593a0196109.

Changed paths:
    engines/sword1/sound.cpp


diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 67f94854eb4..540903a965d 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -1008,7 +1008,7 @@ bool Sound::prepareMusicStreaming(const Common::Path &filename, int newHandleId,
 			return false;
 		}
 
-		sampleRate = wavHead.dwSamplesPerSec;
+		sampleRate = FROM_LE_32(wavHead.dwSamplesPerSec);
 	}
 #ifdef USE_FLAC
 	else if (assignedMode == MusFLAC) {




More information about the Scummvm-git-logs mailing list