[Scummvm-git-logs] scummvm master -> bb4863969f55d03be3a5bf4244dfd653810a6162
criezy
criezy at scummvm.org
Wed Feb 17 12:36:37 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:
da89e91e5c SCUMM: Digital iMUSE: fix FT crash and music breaking bug
bb4863969f SCUMM: Digital iMUSE: deschedule crossfades for flushed tracks
Commit: da89e91e5c34991b7983cd3f36bdfb9cc572a0cc
https://github.com/scummvm/scummvm/commit/da89e91e5c34991b7983cd3f36bdfb9cc572a0cc
Author: Andrea Boscarino (andrea.boscarino2 at unibo.it)
Date: 2021-02-17T12:36:33Z
Commit Message:
SCUMM: Digital iMUSE: fix FT crash and music breaking bug
Changed paths:
engines/scumm/imuse_digi/dimuse.cpp
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index 7110b827ce..e5b42d6079 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -589,22 +589,25 @@ void IMuseDigital::switchToNextRegion(Track *track) {
}
int jumpId = _sound->getJumpIdByRegionAndHookId(soundDesc, track->curRegion, track->curHookId);
- if ((_vm->_game.id != GID_CMI && jumpId != -1) || (_vm->_game.id == GID_CMI && jumpId != -1 && !track->alreadyCrossfading)) {
+ if ((_vm->_game.id != GID_CMI && jumpId != -1) || (_vm->_game.id == GID_CMI && jumpId != -1 && !track->toBeRemoved && !track->alreadyCrossfading)) {
int region = _sound->getRegionIdByJumpId(soundDesc, jumpId);
assert(region != -1);
int sampleHookId = _sound->getJumpHookId(soundDesc, jumpId);
assert(sampleHookId != -1);
- bool isJumpToStart = (soundDesc->jump[jumpId].dest == soundDesc->marker[2].pos && !scumm_stricmp(soundDesc->marker[2].ptr, "start"));
+ bool isJumpToStart = false;
bool isJumpToLoop = false;
- if (!isJumpToStart) {
- for (int m = 0; m < soundDesc->numMarkers; m++) {
- if (soundDesc->jump[jumpId].dest == soundDesc->marker[m].pos) {
- Common::String markerDesc = soundDesc->marker[m].ptr;
- if (markerDesc.contains("loop")) {
- isJumpToLoop = true;
+ if (_vm->_game.id == GID_CMI) {
+ isJumpToStart = (soundDesc->jump[jumpId].dest == soundDesc->marker[2].pos && !scumm_stricmp(soundDesc->marker[2].ptr, "start"));
+ if (!isJumpToStart) {
+ for (int m = 0; m < soundDesc->numMarkers; m++) {
+ if (soundDesc->jump[jumpId].dest == soundDesc->marker[m].pos) {
+ Common::String markerDesc = soundDesc->marker[m].ptr;
+ if (markerDesc.contains("loop")) {
+ isJumpToLoop = true;
+ }
+ break;
}
- break;
}
}
}
Commit: bb4863969f55d03be3a5bf4244dfd653810a6162
https://github.com/scummvm/scummvm/commit/bb4863969f55d03be3a5bf4244dfd653810a6162
Author: Andrea Boscarino (andrea.boscarino2 at unibo.it)
Date: 2021-02-17T12:36:33Z
Commit Message:
SCUMM: Digital iMUSE: deschedule crossfades for flushed tracks
Changed paths:
engines/scumm/imuse_digi/dimuse_script.cpp
diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp
index 4ab89c7cc0..77078fa8bf 100644
--- a/engines/scumm/imuse_digi/dimuse_script.cpp
+++ b/engines/scumm/imuse_digi/dimuse_script.cpp
@@ -165,6 +165,9 @@ void IMuseDigital::flushTrack(Track *track) {
if (!_mixer->isSoundHandleActive(track->mixChanHandle)) {
track->reset();
}
+
+ if (_vm->_game.id == GID_CMI && track->trackId < MAX_DIGITAL_TRACKS)
+ _scheduledCrossfades[track->trackId].scheduled = false;
}
void IMuseDigital::flushTracks() {
@@ -174,6 +177,8 @@ void IMuseDigital::flushTracks() {
Track *track = _track[l];
if (track->used && track->toBeRemoved && !_mixer->isSoundHandleActive(track->mixChanHandle)) {
debug(5, "flushTracks() - trackId:%d, soundId:%d", track->trackId, track->soundId);
+ if (_vm->_game.id == GID_CMI && l < MAX_DIGITAL_TRACKS)
+ _scheduledCrossfades[track->trackId].scheduled = false;
track->reset();
}
}
More information about the Scummvm-git-logs
mailing list