From 0f8a359f16bdb46b32b806fd30492d70c91373cc Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 27 Apr 2024 16:35:30 -0500 Subject: [PATCH] Disable sounds lower-level when --no-sound is passed, for performance --- fallout_functions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fallout_functions.py b/fallout_functions.py index 175fb13..c963487 100644 --- a/fallout_functions.py +++ b/fallout_functions.py @@ -114,7 +114,7 @@ def _playQueue(): if _queueRunning: return _queueRunning = True - while 1: + while _soundCheck(): if len(_soundQueue) > 0: _playSound(_soundQueue[0], True) _soundQueue.pop(0) @@ -152,7 +152,8 @@ def addSound(file): Add sounds to the queue """ global _soundQueue - _soundQueue.extend([file]) + if soundCheck(): + _soundQueue.extend([file]) _queueMgr = Thread(target=_playQueue)