[Scummvm-git-logs] scummvm master -> bc24fdcf145d0e416777c3c51d9406d735cd5559
athrxx
noreply at scummvm.org
Sat Nov 2 13:18:25 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:
bc24fdcf14 SCUMM: (MI1/Mac) - fix music glitch when changing quality
Commit: bc24fdcf145d0e416777c3c51d9406d735cd5559
https://github.com/scummvm/scummvm/commit/bc24fdcf145d0e416777c3c51d9406d735cd5559
Author: athrxx (athrxx at scummvm.org)
Date: 2024-11-02T14:17:56+01:00
Commit Message:
SCUMM: (MI1/Mac) - fix music glitch when changing quality
(also revert 08c17d451359247439512eca422287d8efcc871e
which was wrong)
Changed paths:
engines/scumm/players/player_mac_loom_monkey.cpp
engines/scumm/players/player_mac_new.cpp
diff --git a/engines/scumm/players/player_mac_loom_monkey.cpp b/engines/scumm/players/player_mac_loom_monkey.cpp
index 541d8fcb0a2..389edc1a747 100644
--- a/engines/scumm/players/player_mac_loom_monkey.cpp
+++ b/engines/scumm/players/player_mac_loom_monkey.cpp
@@ -714,13 +714,13 @@ void LoomMonkeyMacSnd::sendSoundCommands(int timeStamp) {
if (_chanUse == 1 && _sndChannel) {
while (_loader->parseNextEvent(0, duration, note, skip, updateInstr)) {
- if (timeStamp > 0) {
- int ts = timeStamp;
- timeStamp = MAX<int>(0, timeStamp - duration);
- duration -= ts;
+ if (timeStamp > 0 && !skip) {
+ timeStamp -= duration;
+ if (timeStamp >= 0)
+ skip = true;
+ else if (timeStamp < 0)
+ duration = -timeStamp;
}
- if (timeStamp)
- continue;
if (updateInstr)
_sdrv->loadInstrument(_sndChannel, MacLowLevelPCMDriver::kEnqueue, _loader->getInstrData(0));
@@ -751,15 +751,14 @@ void LoomMonkeyMacSnd::sendSoundCommands(int timeStamp) {
busy &= ~(1 << i);
continue;
}
- if (tmstmp[i] > 0) {
- int ts = tmstmp[i];
- tmstmp[i] = MAX<int>(0, tmstmp[i] - duration);
- duration -= ts;
+ if (tmstmp[i] > 0 && !skip) {
+ tmstmp[i] -= duration;
+ if (tmstmp[i] >= 0)
+ skip = true;
+ else if (tmstmp[i] < 0)
+ duration = -tmstmp[i];
}
- if (tmstmp[i])
- continue;
-
if (updateInstr)
_sdrv->loadInstrument(_musChannels[i], MacLowLevelPCMDriver::kEnqueue, _loader->getInstrData(i + 1));
diff --git a/engines/scumm/players/player_mac_new.cpp b/engines/scumm/players/player_mac_new.cpp
index a9436dc21de..1063defcd0c 100644
--- a/engines/scumm/players/player_mac_new.cpp
+++ b/engines/scumm/players/player_mac_new.cpp
@@ -32,7 +32,7 @@
namespace Scumm {
#define ASC_DEVICE_RATE 0x56EE8BA3
-#define VBL_UPDATE_RATE 0x003C0000
+#define VBL_UPDATE_RATE 0x003C25BD
#define PCM_BUFFER_RESERVE 64
#define RATECNV_BIT_PRECSN 24
More information about the Scummvm-git-logs
mailing list