Merge pull request #53 from CorVous/fixing-infinite-loop

Sleep instead when there's no audio in the buffer
This commit is contained in:
davabase 2024-03-14 11:13:46 -07:00 committed by GitHub
commit 34d2a00608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ def main():
print(line) print(line)
# Flush stdout. # Flush stdout.
print('', end='', flush=True) print('', end='', flush=True)
else:
# Infinite loops are bad for processors, must sleep. # Infinite loops are bad for processors, must sleep.
sleep(0.25) sleep(0.25)
except KeyboardInterrupt: except KeyboardInterrupt: