On Sun, Dec 02, 2012 at 09:34:02PM +0000, Victor Lazzarini wrote: > By the way, is there realtime audio on Haiku?If so, what type of API is it (blocking, asynchronous), and what kind of latencies are experienced? > Oh, yes! I'm playing Csound real-time from my MIDI keyboard, with a latency of about 13 ms. I might be able to improve that slightly, but at the moment it's fine for me. I have to admit, though, that I needed to tweak the HDA driver a bit to get such latency. It's built with a large buffer size -- probably dating from earlier times when there were problems with interrupt scheduling and so on. Default latency is about 1/5sec! I've patched the driver to allow setting the buffers suitably smaller, and it works perfectly (on my 2.39GHz 4-Processor laptop), but the patch is still awaiting commission by one of the core folks. Not sure I understand the "blocking/asynchronous" choice. Basically a source gets a buffer pool which it fills as needed, and sends each buffer down a chain with a tag indicating when it is *supposed* to be performed. It will normally know the expected latency, and will send the buffer at a suitable earlier time. If the circulating buffer pool gets emptied for some reason, the source will of course block, but normally there'll be enough in the pool to avoid that. The normal chain is for the source (like Csound) to send straight to the system mixer, where all sources are of course mixed into a single output, with suitable timing, and these new buffers go on to the driver. The idea is that a buffer can go through an arbitrary set of processing nodes before it gets to the mixer, or possibly even bypass that, or go to a recorder, but it looks to me as if this is still entirely buggy. On BeOS there is an app called 'Cortex' that shows the nodes and the paths between them, and you can 'rewire' these as you like. Haiku has the same Cortex, but rewiring doesn't work -- the chain just goes dead if you try it. I'm sure this is a temporary problem, but it does negate the nice design of the audio system a bit! Cheers, -- Pete -- ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: BUILD Helping you discover the best ways to construct your parallel projects. http://goparallel.sourceforge.net _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net