wait until output buffer empties before finishing

This commit is contained in:
drowe67 2021-12-15 11:33:07 +10:30 committed by David Rowe
parent 8c9f1c5761
commit b619b341d1

View file

@ -155,7 +155,9 @@ for i in range(1,N_BURSTS+1):
sys.stdout.flush()
# and at last check if we had an openend pyaudio instance and close it
if AUDIO_OUTPUT_DEVICE != -1:
# and at last check if we had an opened pyaudio instance and close it
if AUDIO_OUTPUT_DEVICE != -1:
time.sleep(stream_tx.get_output_latency())
stream_tx.stop_stream()
stream_tx.close()
p.terminate()