Disable sounds lower-level when --no-sound is passed, for performance

This commit is contained in:
Firepup Sixfifty 2024-04-27 16:35:30 -05:00
parent 4bc7345546
commit 0f8a359f16
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -114,7 +114,7 @@ def _playQueue():
if _queueRunning: if _queueRunning:
return return
_queueRunning = True _queueRunning = True
while 1: while _soundCheck():
if len(_soundQueue) > 0: if len(_soundQueue) > 0:
_playSound(_soundQueue[0], True) _playSound(_soundQueue[0], True)
_soundQueue.pop(0) _soundQueue.pop(0)
@ -152,7 +152,8 @@ def addSound(file):
Add sounds to the queue Add sounds to the queue
""" """
global _soundQueue global _soundQueue
_soundQueue.extend([file]) if soundCheck():
_soundQueue.extend([file])
_queueMgr = Thread(target=_playQueue) _queueMgr = Thread(target=_playQueue)