[Scummvm-git-logs] scummvm master -> 706e3bc1d8da6bfbdfe547d1871396b574d5057f
athrxx
athrxx at scummvm.org
Tue Nov 9 18:43:06 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
44af25e9bb KYRA: (LoK/Mac) - minor cleanup
c5b56b52a7 KYRA: (LoK/Mac) - ensure music restart after playing the flute
706e3bc1d8 KYRA: (LoK/Mac) - partially revert dc5992a2 + some cleanup
Commit: 44af25e9bb7e75c81709ad72bb35a5b7634a7aaf
https://github.com/scummvm/scummvm/commit/44af25e9bb7e75c81709ad72bb35a5b7634a7aaf
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-09T19:40:35+01:00
Commit Message:
KYRA: (LoK/Mac) - minor cleanup
Changed paths:
engines/kyra/sound/drivers/halestorm.cpp
diff --git a/engines/kyra/sound/drivers/halestorm.cpp b/engines/kyra/sound/drivers/halestorm.cpp
index 5079111b65..a2f1b797bb 100644
--- a/engines/kyra/sound/drivers/halestorm.cpp
+++ b/engines/kyra/sound/drivers/halestorm.cpp
@@ -267,7 +267,7 @@ private:
uint16 _transCycleLenDef;
uint16 _smpTransLen;
uint16 _transCycleLenInter;
- uint16 _pmDataTrm;
+ const uint16 _pmDataTrm;
bool _updateTypeHq;
const uint16 _pcmDstBufferSize;
@@ -560,7 +560,7 @@ void HSAudioStream::runVblTasl() {
(*_vblCbProc)();
}
-HSLowLevelDriver::HSLowLevelDriver(SoundMacRes *res, Common::Mutex &mutex) : _res(res), _vcstr(0), _mutex(mutex), _sampleConvertBuffer(0), _interpolationTable(0),
+HSLowLevelDriver::HSLowLevelDriver(SoundMacRes *res, Common::Mutex &mutex) : _res(res), _vcstr(0), _mutex(mutex), _sampleConvertBuffer(0), _interpolationTable(0), _transCycleLenDef(0),
_interpolationTable2(0), _amplitudeScaleBuffer(0), _songFlags(0), _amplitudeScaleFlags(0), _interpolationMode(kNone), _numChanMusic(0), _convertUnitSize(0), _numChanSfx(0),
_midiCurCmd(0), _convertBufferNumUnits(0), _songLoop(false), _chan(0), _samplesPerTick(0), _smpTransLen(0), _transCycleLenInter(0), _updateTypeHq(0), _instruments(0), _songData(),
_midiData(), _trackState(0), _sndInterpolateType(0), _song_transpose(0), _song_tickLen(0), _song_tempo(0), _song_ticksPerSecond(0), _song_internalTempo(0), _midiFastForward(false),
Commit: c5b56b52a722ab232fb82657adc006f22bb5bd63
https://github.com/scummvm/scummvm/commit/c5b56b52a722ab232fb82657adc006f22bb5bd63
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-09T19:41:45+01:00
Commit Message:
KYRA: (LoK/Mac) - ensure music restart after playing the flute
The flute will terminate the current background music (verified with emulator), since the flute sound is actually a song itself. This change makes sure that the music restarts when leaving the screen...
Changed paths:
engines/kyra/sound/sound_lok.cpp
engines/kyra/sound/sound_mac_lok.cpp
diff --git a/engines/kyra/sound/sound_lok.cpp b/engines/kyra/sound/sound_lok.cpp
index 34436637a0..2fda1a68b1 100644
--- a/engines/kyra/sound/sound_lok.cpp
+++ b/engines/kyra/sound/sound_lok.cpp
@@ -33,9 +33,11 @@ void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) {
track = 58;
else
track -= 16;
- }
-
- if (_flags.platform == Common::kPlatformFMTowns && track == 49) {
+ } else if (_flags.platform == Common::kPlatformMacintosh && track >= 97 && track <= 99) {
+ _sound->playTrack(track - 79);
+ _lastMusicCommand = -1;
+ return;
+ } else if (_flags.platform == Common::kPlatformFMTowns && track == 49) {
snd_playWanderScoreViaMap(56, 1);
return;
}
diff --git a/engines/kyra/sound/sound_mac_lok.cpp b/engines/kyra/sound/sound_mac_lok.cpp
index c98b39b1f8..4108a0bd39 100644
--- a/engines/kyra/sound/sound_mac_lok.cpp
+++ b/engines/kyra/sound/sound_mac_lok.cpp
@@ -207,11 +207,6 @@ void SoundMac::playSoundEffect(uint16 track, uint8) {
if (track > 21 && track < 38)
_driver->startSoundEffect(_resIDSfxIntro[_soundEffectDefsIntro[track - 22].number]);
} else {
- if (track >= 97 && track <= 99) {
- playTrack(track - 79);
- return;
- }
-
const SoundEffectDef *se = &_soundEffectDefsIngame[track];
if (se->note)
_driver->enqueueSoundEffect(_resIDSfxIngame[se->number], se->rate, se->note);
Commit: 706e3bc1d8da6bfbdfe547d1871396b574d5057f
https://github.com/scummvm/scummvm/commit/706e3bc1d8da6bfbdfe547d1871396b574d5057f
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-09T19:41:58+01:00
Commit Message:
KYRA: (LoK/Mac) - partially revert dc5992a2 + some cleanup
(that commit which was just meant to silence a couple of gcc warnings actually broke the LQ audio)
Changed paths:
engines/kyra/sound/drivers/halestorm.cpp
diff --git a/engines/kyra/sound/drivers/halestorm.cpp b/engines/kyra/sound/drivers/halestorm.cpp
index a2f1b797bb..2fd464b4a9 100644
--- a/engines/kyra/sound/drivers/halestorm.cpp
+++ b/engines/kyra/sound/drivers/halestorm.cpp
@@ -1011,7 +1011,7 @@ void HSLowLevelDriver::createTables() {
else if (len < 0)
error("void HSLowLevelDriver::createTables(): Invalid parameters");
- assert(dst - _sampleConvertBuffer + (len << 7) + 32 <= (_convertBufferNumUnits << 8) + 64);
+ assert(dst - _sampleConvertBuffer + (len << 7) <= (_convertBufferNumUnits << 8));
}
// ampitude scale buffer
@@ -1118,7 +1118,7 @@ void HSLowLevelDriver::pcmUpdateChannel(HSSoundChannel &chan) {
next = 1;
} else {
chan.status = -1;
- if (!(_songFlags & 0x200) && (chan.tickDataLen < (uint32)(chan.dataEnd - chan.stateCur.dataPos))) {
+ if (!(_songFlags & 0x200) && ((int)chan.tickDataLen < (chan.dataEnd - chan.stateCur.dataPos))) {
chan.mode = -1;
chan.stateSaved = chan.stateCur;
}
@@ -1178,7 +1178,7 @@ void HSLowLevelDriver::pcmUpdateChannel(HSSoundChannel &chan) {
}
}
- if (next == 1 || chan.tickDataLen < (uint32)(chan.dataEnd - src)) {
+ if (next == 1 || (int)chan.tickDataLen < (chan.dataEnd - src)) {
if (!(rate & 0xffff) || chan.imode == kNone) {
if (chan.stateCur.velocity) {
HS_DOCYCLE(HS_CYCL_DEF((_transCycleLenDef + 1) * 5), at[*src], HS_VOID)
@@ -1697,7 +1697,7 @@ void HSLowLevelDriver::noteOn(uint8 part, uint8 prg, uint8 note, uint8 velo, uin
if (!(_songFlags & 0x200)) {
chan->mode = 1;
- if (chan->status >= 0 && chan->tickDataLen && (chan->tickDataLen < (uint32)(chan->dataEnd - chan->stateCur.dataPos))) {
+ if (chan->status >= 0 && chan->tickDataLen && (int)chan->tickDataLen < (chan->dataEnd - chan->stateCur.dataPos)) {
chan->mode = -1;
chan->stateSaved = chan->stateCur;
}
@@ -2129,10 +2129,19 @@ int HSSoundSystem::doCommand(int cmd, va_list &arg) {
_driver->send(19, CLIP(va_arg(arg, int), 0, 256));
break;
+ case 14:
+ tmp = va_arg(arg, int);
+ if (tmp & 4) {
+ if (tmp & 2)
+ _driver->send(24, 0x200 | ((tmp & 1) ? 22 : 11));
+ else
+ _driver->send(24, 0x100 | ((tmp & 1) ? 22 : 11));
+ } else if (tmp & 2) {
+ _driver->send(24, (tmp & 1) ? 22 : 11);
+ }
+ break;
+
case 15:
- /*if (unk == 100)
- break;
- unk = 100;*/
res = _driver->send(25) ? -1 : changeSystemVoices(16, 8, 0);
break;
More information about the Scummvm-git-logs
mailing list