[Scummvm-git-logs] scummvm master -> 30a1b4867ee69ac189e7af2a1e10750b323e864b
AndywinXp
noreply at scummvm.org
Sun Dec 25 20:17:39 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:
30a1b4867e SCUMM: Fix a couple of sound issues in Indy3 Macintosh (Trac#13887)
Commit: 30a1b4867ee69ac189e7af2a1e10750b323e864b
https://github.com/scummvm/scummvm/commit/30a1b4867ee69ac189e7af2a1e10750b323e864b
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-12-25T21:17:36+01:00
Commit Message:
SCUMM: Fix a couple of sound issues in Indy3 Macintosh (Trac#13887)
If you ring the boxing bell right at the start of the game, you'll see
Indy hit it 3 times, but the actual bell sound will only be heard twice.
This doesn't happen in the original interpreter or in the other releases
where it can be heard 3 times as expected. Another example is the sound
effect for thunder when Indy is outside the windows of Castle Brunwald;
although it sounds a bit weird this way, the sound is really meant to
have some quick "false starts".
The byte at offset 26 might be responsible for this, in that if it's
unset, the current (identical?) sound is maybe meant to be interrupted.
This is just based on the Indy3 Amiga fixes brought by PR#3598, and
from some naive guesswork. But this change is only applied to Indy3 Mac
and appears to cause no regression (I've done a full gameplay).
Thus, until someone checks this against the original Indy3 Macintosh
interpreter (we have no disasm for it yet), doing this change probably
makes sense for now...
And Andy says I should be more confident about this change :p
Changed paths:
engines/scumm/sound.cpp
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index bc96909b75d..c52ad86b051 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -548,7 +548,7 @@ void Sound::playSound(int soundID) {
// offset 22-23: ? often identical to the rate divisior? (but not in sound 8, which loops)
// offset 24, byte (?): volume
// offset 25: ? same as volume -- maybe left vs. right channel?
- // offset 26: ? if != 0: stop current sound?
+ // offset 26: if == 0: stop current identical sound (see ptr[26] comment below)
// offset 27: ? loopcount? 0xff == -1 for infinite?
size = READ_BE_UINT16(ptr + 12);
@@ -574,6 +574,18 @@ void Sound::playSound(int soundID) {
stream = plainStream;
}
+ // When unset, we assume that this byte is meant to interrupt any other
+ // instance of the current sound (as done by the Indy3 Amiga driver,
+ // which was checked against disassembly). A good test for the expected
+ // behavior is to ring the boxing bell in room 73; in the original
+ // interpreter it rings 3 times in a row, and if we don't do this the
+ // second bell sound is never heard. Another example is the thunder
+ // sound effect when Indy is outside the windows of Castle Brunwald
+ // (room 13): it's meant to have a couple of "false starts".
+ // TODO: do an actual disasm of Indy3 Macintosh (anyone? ;)
+ if (!ptr[26])
+ _mixer->stopID(soundID);
+
_mixer->playStream(Audio::Mixer::kSFXSoundType, nullptr, stream, soundID, vol, 0);
}
else {
More information about the Scummvm-git-logs
mailing list