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:
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)