[Scummvm-git-logs] scummvm master -> 430826a48e9de05eea9326f2dca7a605722bb9fe
sluicebox
noreply at scummvm.org
Thu Jan 1 23:17:22 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:
430826a48e HUGO: Fix stuck DOS notes when turning off sound
Commit: 430826a48e9de05eea9326f2dca7a605722bb9fe
https://github.com/scummvm/scummvm/commit/430826a48e9de05eea9326f2dca7a605722bb9fe
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2026-01-01T15:16:11-08:00
Commit Message:
HUGO: Fix stuck DOS notes when turning off sound
Changed paths:
engines/hugo/sound.cpp
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 5e4b917bdb5..3c56ce49132 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -273,8 +273,19 @@ void SoundHandler::pcspkr_player() {
static const uint16 pcspkrFlats[8] = {1435, 1279, 2342, 2150, 1916, 1755, 1611}; // The flats, Ab to Bb
// Does the user not want any sound?
- if (!_vm->_config._soundFl || !_vm->_mixer->isReady())
+ if (!_vm->_config._soundFl) {
+ // If user turned off sound during a song then stop note and song
+ if (_DOSSongPtr != nullptr && *_DOSSongPtr != '\0') {
+ _speaker->stop();
+ // Advance to end of song
+ while (*_DOSSongPtr != '\0') {
+ _DOSSongPtr++;
+ }
+ }
return;
+ } else if (!_vm->_mixer->isReady()) {
+ return;
+ }
// Is there no song?
if (!_DOSSongPtr)
More information about the Scummvm-git-logs
mailing list