I am writing a program to stream audio over a network, so I have a thread to record data and one to send it. When testing the audio has noticeable gaps. I beleive this is due to the sounddevice.play() function, the example below has the same problem. The gaps coincide with the play length, so it appears to be caused