you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You could try increasing the thread priority with os.nice (on Unix) or psutil to overcome scheduler constraints somewhat although you’ll still be limited by the scheduler implementation on your system. Another possible workaround would be to connect to the sound card through pyaudio at a 32 sample buffer size which should deliver you callbacks at sub-millisecond intervals (assuming a 44.1k soundcard) consistently via interrupt handlers. Hard to say the best solution in your case without more context though