I am trying to make my audio interface continuous play the same audio in a loop. Someone recommended the use of the "OutputStream" function in the sounddevice library. This is the code I wrote to do this:
sounddevice.default.device = "Focusrite USB ASIO, ASIO"
sounddevice.default.samplerate = 48000
stream = sounddevice.OutputStream()
stream.start()
stream.write(data)
The last line code is giving me the error:
sounddevice.PortAudioError: Wait timed out [PaErrorCode -9987]
What am I doing wrong?