[Scummvm-git-logs] scummvm master -> 7e8d970ef53800bc69fbdb7fc8dfa57c11aba18c
athrxx
athrxx at scummvm.org
Sat May 1 18:07:50 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:
682e7f1230 KYRA: fix bug no. 12507 (Background music suddenly turns off in Legend of Kyrandia 2)
7e8d970ef5 KYRA: change Adlib driver queue to behave more like the original driver
Commit: 682e7f1230f8a9c987ffb4a3f451069857f57c17
https://github.com/scummvm/scummvm/commit/682e7f1230f8a9c987ffb4a3f451069857f57c17
Author: athrxx (athrxx at scummvm.org)
Date: 2021-05-01T20:05:40+02:00
Commit Message:
KYRA: fix bug no. 12507 (Background music suddenly turns off in Legend of Kyrandia 2)
(regression from 189ee12c)
Changed paths:
engines/kyra/sound/drivers/adlib.cpp
diff --git a/engines/kyra/sound/drivers/adlib.cpp b/engines/kyra/sound/drivers/adlib.cpp
index 1b163afb78..c40069ffca 100644
--- a/engines/kyra/sound/drivers/adlib.cpp
+++ b/engines/kyra/sound/drivers/adlib.cpp
@@ -433,7 +433,8 @@ void AdLibDriver::setSoundData(uint8 *data, uint32 size) {
// Drop all tracks that are still queued. These would point to the old
// sound data.
_programQueueStart = _programQueueEnd = 0;
- _programQueue[0] = QueueEntry();
+ for (int i = 0; i < ARRAYSIZE(_programQueue); ++i)
+ _programQueue[i] = QueueEntry();
_sfxPointer = nullptr;
Commit: 7e8d970ef53800bc69fbdb7fc8dfa57c11aba18c
https://github.com/scummvm/scummvm/commit/7e8d970ef53800bc69fbdb7fc8dfa57c11aba18c
Author: athrxx (athrxx at scummvm.org)
Date: 2021-05-01T20:05:50+02:00
Commit Message:
KYRA: change Adlib driver queue to behave more like the original driver
(in case of an overflow drop the oldest sound instead of the newest)
Changed paths:
engines/kyra/sound/drivers/adlib.cpp
diff --git a/engines/kyra/sound/drivers/adlib.cpp b/engines/kyra/sound/drivers/adlib.cpp
index c40069ffca..4b0f7ba3fa 100644
--- a/engines/kyra/sound/drivers/adlib.cpp
+++ b/engines/kyra/sound/drivers/adlib.cpp
@@ -449,12 +449,11 @@ void AdLibDriver::startSound(int track, int volume) {
if (!trackData)
return;
- if (_programQueueEnd == _programQueueStart && _programQueue[_programQueueEnd].data != 0) {
- // Don't warn when dropping tracks in EoB. The queue is always full there if a couple of monsters are around.
- if (_version >= 3)
- warning("AdLibDriver: Program queue full, dropping track %d", track);
- return;
- }
+ // We used to drop the new sound here, but that isn't the behavior of the original code.
+ // It would cause more issues than do any good. Now, we just have a debug message and
+ // then drop the oldest sound, like the original driver...
+ if (_programQueueEnd == _programQueueStart && _programQueue[_programQueueEnd].data != 0)
+ debugC(3, kDebugLevelSound, "AdLibDriver: Program queue full, dropping track %d", _programQueue[_programQueueEnd].id);
_programQueue[_programQueueEnd] = QueueEntry(trackData, track, volume);
++_programQueueEnd &= 15;
More information about the Scummvm-git-logs
mailing list