[Scummvm-git-logs] scummvm master -> 0b7194ecc47cbd64034bc0a361c5ae31b95b29f9
sev-
sev at scummvm.org
Sun May 30 09:40:51 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
346dd65927 AUDIO: Do not crash on ImpulseTracker modules
0b7194ecc4 SLUDGE: Gracefully continue on MOD music failure. Happens with IT modules now
Commit: 346dd65927e8c189bfbfe35625f3ccaaf13dcfa5
https://github.com/scummvm/scummvm/commit/346dd65927e8c189bfbfe35625f3ccaaf13dcfa5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-05-30T11:40:37+02:00
Commit Message:
AUDIO: Do not crash on ImpulseTracker modules
Changed paths:
audio/mods/module_mod_xm_s3m.cpp
diff --git a/audio/mods/module_mod_xm_s3m.cpp b/audio/mods/module_mod_xm_s3m.cpp
index b7a6a89813..61c697343e 100644
--- a/audio/mods/module_mod_xm_s3m.cpp
+++ b/audio/mods/module_mod_xm_s3m.cpp
@@ -235,8 +235,7 @@ bool ModuleModXmS3m::loadMod(Common::SeekableReadStream &st) {
sample.name[22] = '\0';
sample.length = 2 * st.readUint16BE();
- sample.finetune = st.readByte();
- assert(sample.finetune < 0x10);
+ sample.finetune = st.readByte() & 0xF;
sample.volume = st.readByte();
sample.loopStart = 2 * st.readUint16BE();
Commit: 0b7194ecc47cbd64034bc0a361c5ae31b95b29f9
https://github.com/scummvm/scummvm/commit/0b7194ecc47cbd64034bc0a361c5ae31b95b29f9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-05-30T11:40:37+02:00
Commit Message:
SLUDGE: Gracefully continue on MOD music failure. Happens with IT modules now
Changed paths:
engines/sludge/sound.cpp
diff --git a/engines/sludge/sound.cpp b/engines/sludge/sound.cpp
index 7f2fe55460..71811f9748 100644
--- a/engines/sludge/sound.cpp
+++ b/engines/sludge/sound.cpp
@@ -224,7 +224,15 @@ bool SoundManager::playMOD(int f, int a, int fromTrack) {
if (memImage->size() != (int)length || readStream->err()) {
return fatal("Sound reading failed");
}
- Audio::LoopingAudioStream *stream = new Audio::LoopingAudioStream(Audio::makeModXmS3mStream(memImage, DisposeAfterUse::NO, fromTrack), 0, DisposeAfterUse::YES, false);
+ Audio::RewindableAudioStream *mod = Audio::makeModXmS3mStream(memImage, DisposeAfterUse::NO, fromTrack);
+
+ if (!mod) {
+ warning("Could not load MOD file");
+ g_sludge->_resMan->finishAccess();
+ return false;
+ }
+
+ Audio::LoopingAudioStream *stream = new Audio::LoopingAudioStream(mod, 0, DisposeAfterUse::YES, false);
if (stream) {
// play sound
More information about the Scummvm-git-logs
mailing list