| I am pleased to report that I have committed a preliminary implementation of
low-latency real-time audio for Windows. I can now get down to 3
milliseconds latency with Csound 5 using PortAudio 19 onfigured for ASIO.
Because blocking I/O is not implemented in PortAudio 19, and because I
prefer not to become a PortAudio developer, I have written a blocking
wrapper for asynchronous I/O. This has required #ifdefs for WIN32 in rtpa.c.
The blocking code is in InOut/pa_blocking.c and H/pa_blocking.h.
At this time, it is required that -b, -B, and ksmps all be set to exactly
the same value. I would prefer to remove the -b and -B options, and also to
remove Csound's intermediate buffer code, because PortAudio and libsndfile
both have their own intermediate buffer code. This means that the Csound
buffering layer now is not only no longer necessary, but also introduces
unnecessary complexity and some small unnecessary performance overhad.
However, I am waiting for feedback from John ffitch and other developers
before I do anything about this.
This work should not affect any platform except for Windows.
I still need to do a little work for audio input, catching errors, and
stopping performance, so I have not yet prepared a new file distribution. |