py-simple-audio
py-simple-audio copied to clipboard
play function is blocking for 200ms!
Dear all.
Although I know that this package is archived, I just wanted underline that each time I call the play function inside an async function (ubuntu 20.04) , having the file loaded in advance, the task is blocking the coroutine loop by 200ms. This might not be suitable for some time constrained applications. I tried to figure a workaround by checking the source code, but did not succeed.
I am considering moving the call to a different process, so that it is not blocking the async loop (a thread would be non sense as well for the GIL)
Regards
PS: It is a great library hiowever!!
@bsense-rius I agree - looking at the ALSA version, I don't see anything obvious. My guess is that some part of the ALSA initialization is taking significant time for some reason but it would probably take printing the system time at various points in the process to determine the culprit.
Ok Sir.
Thank you very much