[Scummvm-git-logs] scummvm master -> 99527f903b037ece9914dc23bf43dd435ccd1c35
whoozle
noreply at scummvm.org
Sun Mar 8 22:02:56 UTC 2026
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:
99527f903b PHOENIXVR: stop all sounds on `end` command
Commit: 99527f903b037ece9914dc23bf43dd435ccd1c35
https://github.com/scummvm/scummvm/commit/99527f903b037ece9914dc23bf43dd435ccd1c35
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-08T22:01:46Z
Commit Message:
PHOENIXVR: stop all sounds on `end` command
Add `stop_all_sounds` console command.
Changed paths:
engines/phoenixvr/console.cpp
engines/phoenixvr/console.h
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/console.cpp b/engines/phoenixvr/console.cpp
index f90bf6fdfa7..f4e3ac4e310 100644
--- a/engines/phoenixvr/console.cpp
+++ b/engines/phoenixvr/console.cpp
@@ -27,6 +27,7 @@ namespace PhoenixVR {
Console::Console() : GUI::Debugger() {
registerCmd("warp", WRAP_METHOD(Console, cmdWarp));
registerCmd("script", WRAP_METHOD(Console, cmdScript));
+ registerCmd("stop_all_sounds", WRAP_METHOD(Console, cmdStopAllSounds));
}
Console::~Console() {
@@ -34,7 +35,7 @@ Console::~Console() {
bool Console::cmdWarp(int argc, const char **argv) {
if (argc < 2) {
- debugPrintf("warp <location.vr>");
+ debugPrintf("warp <location.vr>\n");
return true;
}
g_engine->goToWarp(argv[1]);
@@ -43,11 +44,16 @@ bool Console::cmdWarp(int argc, const char **argv) {
bool Console::cmdScript(int argc, const char **argv) {
if (argc < 2) {
- debugPrintf("script <script.lst>");
+ debugPrintf("script <script.lst>\n");
return true;
}
g_engine->setNextScript(argv[1]);
return false;
}
+bool Console::cmdStopAllSounds(int argc, const char **argv) {
+ g_engine->stopAllSounds();
+ return false;
+}
+
} // End of namespace PhoenixVR
diff --git a/engines/phoenixvr/console.h b/engines/phoenixvr/console.h
index 38eaf5dd570..ea31dc96ecf 100644
--- a/engines/phoenixvr/console.h
+++ b/engines/phoenixvr/console.h
@@ -31,6 +31,7 @@ class Console : public GUI::Debugger {
private:
bool cmdWarp(int argc, const char **argv);
bool cmdScript(int argc, const char **argv);
+ bool cmdStopAllSounds(int argc, const char **argv);
public:
Console();
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 42f0b37725f..b8382f07b27 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -179,6 +179,7 @@ void PhoenixVREngine::loadNextScript() {
void PhoenixVREngine::end() {
debug("end");
+ stopAllSounds();
if (_nextScript.empty() && _nextWarp < 0) {
debug("quit game");
quitGame();
@@ -338,6 +339,12 @@ void PhoenixVREngine::stopSound(const Common::String &sound) {
}
}
+void PhoenixVREngine::stopAllSounds() {
+ _mixer->stopAll();
+ _currentMusic.clear();
+ _sounds.clear();
+}
+
void PhoenixVREngine::playMovie(const Common::String &movie) {
debug("playMovie %s", movie.c_str());
Common::ScopedPtr<Video::VideoDecoder> dec;
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 77a0d9d648e..1ecaecd5f57 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -119,6 +119,7 @@ public:
void playSound(const Common::String &sound, Audio::Mixer::SoundType type, uint8 volume, int loops, bool spatial = false, float angle = 0);
void stopSound(const Common::String &sound);
+ void stopAllSounds();
void playMovie(const Common::String &movie);
void declareVariable(const Common::String &name);
More information about the Scummvm-git-logs
mailing list