[Scummvm-git-logs] scummvm master -> 30273e51d1714e5f7dd2e3b17d40060244d5400f
sluicebox
noreply at scummvm.org
Fri Nov 15 07:58:49 UTC 2024
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:
30273e51d1 AGI: Disallow SoundGenSarien for AGIv1 sounds
Commit: 30273e51d1714e5f7dd2e3b17d40060244d5400f
https://github.com/scummvm/scummvm/commit/30273e51d1714e5f7dd2e3b17d40060244d5400f
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-11-14T23:57:41-08:00
Commit Message:
AGI: Disallow SoundGenSarien for AGIv1 sounds
Fixes crashing and/or infinite loop when selecting PC Speaker emulator
or No Music as the music device for Winnie the Pooh or the PC Booter
version of Donald Duck's Playground
Changed paths:
engines/agi/sound.cpp
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 1231968d97c..057bb05f451 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -183,6 +183,18 @@ SoundMgr::SoundMgr(AgiBase *agi, Audio::Mixer *pMixer) {
_endflag = -1;
_playingSound = -1;
+ // FIXME: AGIv1 sounds are only supported by SoundGenPCJr, so we must not
+ // use SoundGenSarien for those games or it will crash because it expects
+ // the later AGI sound format. This means we cannot currently play these
+ // sounds in PC Speaker mode (SOUND_EMU_PC) or accept SOUND_EMU_NONE,
+ // because SoundGenSarien supports these but SoundGenPCJr does not.
+ if (agi->getVersion() <= 0x2001 && agi->getPlatform() == Common::kPlatformDOS) {
+ if (_vm->_soundemu != SOUND_EMU_PCJR) {
+ warning("Unsupported sound emulation %d for AGIv1 sounds, using PCjr", _vm->_soundemu);
+ _vm->_soundemu = SOUND_EMU_PCJR;
+ }
+ }
+
switch (_vm->_soundemu) {
default:
case SOUND_EMU_NONE:
More information about the Scummvm-git-logs
mailing list