[Scummvm-git-logs] scummvm master -> d0ab4251c5616c2198bdf8dead1a1f4478687f31
sev-
noreply at scummvm.org
Tue May 28 12:47:43 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:
dc5c2f9946 AGOS: Enhance 'music' debugger command with optional track number
d0ab4251c5 AGOS: Added more debug output to music player
Commit: dc5c2f9946e5aea863d755f521235935a9144b1f
https://github.com/scummvm/scummvm/commit/dc5c2f9946e5aea863d755f521235935a9144b1f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-05-28T14:46:43+02:00
Commit Message:
AGOS: Enhance 'music' debugger command with optional track number
Changed paths:
engines/agos/debugger.cpp
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index 290d995ca07..2edc8bb3888 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -54,15 +54,18 @@ bool Debugger::Cmd_PlayMusic(int argc, const char **argv) {
if (_vm->getGameType() == GType_PP) {
// TODO
} else if (_vm->getGameType() == GType_SIMON2) {
+ uint track = 0;
+ if (argc > 2)
+ track = atoi(argv[2]);
_vm->loadMusic(music);
- _vm->_midi->play();
+ _vm->_midi->play(track);
} else {
_vm->playMusic(music, 0);
}
} else
debugPrintf("Music out of range (0 - %d)\n", _vm->_numMusic);
} else
- debugPrintf("Syntax: music <musicnum>\n");
+ debugPrintf("Syntax: music <musicnum> [<tracknum>]\n");
return true;
}
Commit: d0ab4251c5616c2198bdf8dead1a1f4478687f31
https://github.com/scummvm/scummvm/commit/d0ab4251c5616c2198bdf8dead1a1f4478687f31
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-05-28T14:47:18+02:00
Commit Message:
AGOS: Added more debug output to music player
Changed paths:
engines/agos/midiparser_simonwin.cpp
engines/agos/res_snd.cpp
diff --git a/engines/agos/midiparser_simonwin.cpp b/engines/agos/midiparser_simonwin.cpp
index 1915bdad020..cc3d895b620 100644
--- a/engines/agos/midiparser_simonwin.cpp
+++ b/engines/agos/midiparser_simonwin.cpp
@@ -19,6 +19,7 @@
*
*/
+#include "common/debug.h"
#include "agos/midiparser_simonwin.h"
#include "audio/mididrv.h"
@@ -109,7 +110,9 @@ bool MidiParser_SimonWin::loadMusic(byte *data, uint32 size) {
warning("MidiParser_SimonWin::loadMusic - Can only handle %d tracks but was handed %d", MAXIMUM_TRACKS, _numTracks);
return false;
}
-
+
+ debug(2, "MidiParser_SimonWin::loadMusic: %d", _numTracks);
+
// Read the tracks.
byte *trackDataStart;
for (int i = 0; i < _numTracks; ++i) {
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 00cce8a07b4..ab7286269a9 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -134,6 +134,8 @@ void AGOSEngine::skipSpeech() {
void AGOSEngine::loadMusic(uint16 music, bool forceSimon2GmData, bool useSimon2Remapping) {
stopMusic();
+ debug(1, "AGOSEngine::loadMusic(music=%d, forceSimon2GmData=%d, useSimon2Remapping=%d)", music, forceSimon2GmData, useSimon2Remapping);
+
uint16 indexBase = forceSimon2GmData ? MUSIC_INDEX_BASE_SIMON2_GM : _musicIndexBase;
_gameFile->seek(_gameOffsetsPtr[indexBase + music - 1], SEEK_SET);
@@ -233,6 +235,8 @@ void AGOSEngine::playModule(uint16 music) {
}
void AGOSEngine_Simon2::playMusic(uint16 music, uint16 track) {
+ debug(1, "AGOSEngine_Simon2::loadMusic(music=%d, track=%d)", music, track);
+
if (_lastMusicPlayed == 10 && getPlatform() == Common::kPlatformDOS && _midi->usesMT32Data()) {
// WORKAROUND Simon 2 track 10 (played during the first intro scene)
// consist of 3 subtracks. Subtracks 2 and 3 are missing from the MT-32
@@ -406,6 +410,8 @@ void AGOSEngine::stopMusic() {
}
_mixer->stopHandle(_modHandle);
_mixer->stopHandle(_digitalMusicHandle);
+
+ debug(1, "AGOSEngine::stopMusic()");
}
static const byte elvira1_soundTable[100] = {
More information about the Scummvm-git-logs
mailing list