[Scummvm-git-logs] scummvm master -> fb14d06ea937b14d3c759bd190ce77783b863165
athrxx
noreply at scummvm.org
Sat Sep 14 20:09:13 UTC 2024
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:
47e6259566 SCI: minor SCI0 sound volume fix
fb14d06ea9 SCI: (PCJr sound driver) - minor accuracy fix
Commit: 47e6259566b2a8bc5df2d95b83321a4235fba521
https://github.com/scummvm/scummvm/commit/47e6259566b2a8bc5df2d95b83321a4235fba521
Author: athrxx (athrxx at scummvm.org)
Date: 2024-09-14T22:05:48+02:00
Commit Message:
SCI: minor SCI0 sound volume fix
We we send the init midi messages to the SCI0 drivers which the
original doesn't.
This is fine per se, otherwise we would have to add sustain and
pitch bend resets to at least the midi, fb01 and csm1 drivers.
But we should not overwrite the default channel volumes that
some drivers (PCJr, PC-9801) use and which get set in initTrack().
So I just move the sendInitCommands() call before initTrack().
Changed paths:
engines/sci/sound/music.cpp
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index b7c693c5ad0..6f98ab18a93 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -679,6 +679,11 @@ void SciMusic::soundPlay(MusicEntry *pSnd, bool restoring) {
Common::StackLock lock(_mutex);
pSnd->pMidiParser->mainThreadBegin();
+ // Call this before initTrack(), since several sound drivers have custom channel volumes that get set in
+ // initTrack() and we don't want to overwrite those with the generic values from sendInitCommands().
+ if (pSnd->status != kSoundPaused)
+ pSnd->pMidiParser->sendInitCommands();
+
// The track init always needs to be done. Otherwise some sounds will not be properly set up (bug #11476).
// It is also safe to do this for paused tracks, since the jumpToTick() command further down will parse through
// the song from the beginning up to the resume position and ensure that the actual current voice mapping,
@@ -689,8 +694,6 @@ void SciMusic::soundPlay(MusicEntry *pSnd, bool restoring) {
// from the last sound would still be active.
pSnd->pMidiParser->initTrack();
- if (pSnd->status != kSoundPaused)
- pSnd->pMidiParser->sendInitCommands();
pSnd->pMidiParser->setVolume(pSnd->volume);
// Disable sound looping and hold before jumpToTick is called,
Commit: fb14d06ea937b14d3c759bd190ce77783b863165
https://github.com/scummvm/scummvm/commit/fb14d06ea937b14d3c759bd190ce77783b863165
Author: athrxx (athrxx at scummvm.org)
Date: 2024-09-14T22:06:15+02:00
Commit Message:
SCI: (PCJr sound driver) - minor accuracy fix
(improves KQ IV opening)
Changed paths:
engines/sci/sound/drivers/pcjr.cpp
diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 9f08cfb14de..c84f2fa7ff8 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -499,6 +499,11 @@ void MidiDriver_PCJr::send(uint32 b) {
debug(2, "Unused MIDI command %02x %02x %02x", command, op1, op2);
break;
}
+
+ if (!_pcsMode) {
+ _sndUpdateCountDown = 1;
+ _sndUpdateCountDownRem = 0;
+ }
}
uint32 MidiDriver_PCJr::property(int prop, uint32 value) {
@@ -721,7 +726,7 @@ void MidiDriver_PCJr::noteOn(byte part, byte note, byte velocity) {
_channels[i]->noteOn(note, velocity);
return;
}
- } else if (note == 0) {
+ } else if (note == 0 || note == 1) {
return;
}
More information about the Scummvm-git-logs
mailing list