mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
25412ff5cc
commit
3d6e3993d2
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue