Fix water splash sounds bypassing mute via ffplay path

playOneShot() spawns an external ffplay process that bypasses the
miniaudio engine master volume. Now checks getMasterVolume() before
spawning the process.
This commit is contained in:
Kelsi 2026-02-26 02:34:36 -08:00
parent 25412ff5cc
commit 3d6e3993d2

View file

@ -203,6 +203,7 @@ void ActivitySoundManager::rebuildHardLandClipsForProfile(const std::string& rac
bool ActivitySoundManager::playOneShot(const std::vector<Sample>& clips, float volume, float pitchLo, float pitchHi) {
if (clips.empty()) return false;
if (volumeScale <= 0.0001f || volume <= 0.0001f) return true; // Intentionally muted
if (AudioEngine::instance().getMasterVolume() <= 0.0f) return true; // Global mute
reapProcesses();
if (oneShotPid != INVALID_PROCESS) return false;