From: Mandolane T. <su...@ma...> - 2009-04-07 22:55:12
|
Hi Steve On 7 Apr 2009, at 22:53, Steve Taylor wrote: > > I'm still not sure why the latency control method didn't work on your > system, it seemed to work fine for Paul. Low latency should be easy to > achieve on Linux and OS/X, its Windows that makes things hard. I'm under the impression that OS X Core Audio always fetches audio data in blocks of 512 frames, which means that you must have (at least) 512 frames (2048 bytes at 16 bit stereo) written to the SDL buffer when Core Audio decides to do a fetch; any less and the sound will break up. If my impression is wrong, then it would seem to me that the simplest (and best?) technique for writing a Source Data Line would be to open it with a buffer length of 2048 bytes, then write 2048 bytes of data at a time, letting it block when full and unblock after each fetch. This should give a latency of ~11 milliseconds. Am I wrong? Bob |