[Scummvm-git-logs] scummvm master -> c3ad8a5a94c81aa2c360f6b3447f7b906423fca3
AndywinXp
noreply at scummvm.org
Wed Mar 9 08:33:37 UTC 2022
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:
c3ad8a5a94 SCUMM: DiMUSE: Add missing check for already loaded sound
Commit: c3ad8a5a94c81aa2c360f6b3447f7b906423fca3
https://github.com/scummvm/scummvm/commit/c3ad8a5a94c81aa2c360f6b3447f7b906423fca3
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-03-09T09:33:34+01:00
Commit Message:
SCUMM: DiMUSE: Add missing check for already loaded sound
The missing check can cause an issue in The Dig where the sound slots are being filled with the same sound file (background music) after causing a sequence of these two engine actions:
IMuseDigital::setDigMusicState(): Set music state: stateNoChange
IMuseDigital::setDigMusicState(): Set music state: <any valid state which corresponds to a loadable file>
As usual, thanks athrxx!
Changed paths:
engines/scumm/imuse_digi/dimuse_files.cpp
diff --git a/engines/scumm/imuse_digi/dimuse_files.cpp b/engines/scumm/imuse_digi/dimuse_files.cpp
index 0a466736d06..37a76270393 100644
--- a/engines/scumm/imuse_digi/dimuse_files.cpp
+++ b/engines/scumm/imuse_digi/dimuse_files.cpp
@@ -277,7 +277,9 @@ int IMuseDigiFilesHandler::openSound(int soundId) {
getFilenameFromSoundId(soundId, fileName, sizeof(fileName));
int groupId = soundId == kTalkSoundID ? IMUSE_VOLGRP_VOICE : IMUSE_VOLGRP_MUSIC;
- s = _sound->openSound(soundId, fileName, IMUSE_BUNDLE, groupId, -1);
+ s = _sound->findSoundById(soundId);
+ if (!s)
+ s = _sound->openSound(soundId, fileName, IMUSE_BUNDLE, groupId, -1);
if (!s)
s = _sound->openSound(soundId, fileName, IMUSE_BUNDLE, groupId, 1);
if (!s)
More information about the Scummvm-git-logs
mailing list