[Scummvm-git-logs] scummvm master -> 441add02a69ae553ecf74926eb733b46d60356b4
bluegr
noreply at scummvm.org
Wed Nov 19 11:09:10 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
441add02a6 AGOS: Store the currently playing voice, for debug purposes
Commit: 441add02a69ae553ecf74926eb733b46d60356b4
https://github.com/scummvm/scummvm/commit/441add02a69ae553ecf74926eb733b46d60356b4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-11-19T13:08:21+02:00
Commit Message:
AGOS: Store the currently playing voice, for debug purposes
No functional changes. This is useful for any future voice related
workarounds, and aids a lot during debugging
Changed paths:
engines/agos/sound.cpp
engines/agos/sound.h
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 9db03cc4097..bac7a1511bc 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -351,6 +351,7 @@ Sound::Sound(AGOSEngine *vm, const GameSpecificSettings *gss, Audio::Mixer *mixe
_hasVoiceFile = false;
_ambientPlaying = 0;
+ _voicePlaying = 0;
_soundQueuePtr = nullptr;
_soundQueueNum = 0;
@@ -505,9 +506,14 @@ void Sound::playVoice(uint sound) {
_voice->playSound(sound, sound + 1, Audio::Mixer::kMusicSoundType, &_voiceHandle, true, -1500);
else
_voice->playSound(sound, sound, Audio::Mixer::kMusicSoundType, &_voiceHandle, true);
+
+ _voicePlaying = (sound < 11) ? sound + 1 : sound;
} else {
_voice->playSound(sound, Audio::Mixer::kSpeechSoundType, &_voiceHandle, false);
+ _voicePlaying = sound;
}
+
+ debug(0, "Playing voice %d", _voicePlaying);
}
void Sound::playEffects(uint sound) {
@@ -557,11 +563,13 @@ void Sound::stopSfx() {
void Sound::stopVoice() {
_mixer->stopHandle(_voiceHandle);
+ _voicePlaying = 0;
}
void Sound::stopAll() {
_mixer->stopAll();
_ambientPlaying = 0;
+ _voicePlaying = 0;
}
void Sound::effectsMute(bool mute, uint16 effectsVolume) {
@@ -636,6 +644,8 @@ void Sound::playSfx5Data(byte *soundData, uint sound, uint pan, uint vol) {
void Sound::playVoiceData(byte *soundData, uint sound) {
_mixer->stopHandle(_voiceHandle);
playSoundData(&_voiceHandle, soundData, sound);
+
+ _voicePlaying = sound;
}
void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint sound, int pan, int vol, bool loop) {
diff --git a/engines/agos/sound.h b/engines/agos/sound.h
index d9a2deac508..d192feb9057 100644
--- a/engines/agos/sound.h
+++ b/engines/agos/sound.h
@@ -58,6 +58,7 @@ private:
bool _hasEffectsFile;
bool _hasVoiceFile;
uint16 _ambientPlaying;
+ uint _voicePlaying;
// Personal Nightmare specific
byte *_soundQueuePtr;
@@ -105,6 +106,7 @@ public:
bool hasVoice() const;
bool isSfxActive() const;
bool isVoiceActive() const;
+ uint getCurrentVoice() const { return _voicePlaying; }
void stopAllSfx();
void stopSfx();
void stopSfx5();
More information about the Scummvm-git-logs
mailing list