[CELT-dev] Cross Platform Audio Library
Ross Bencina
rossb-lists at audiomulch.com
Fri Dec 10 18:20:34 PST 2010
Jean-Marc Valin wrote:
> Unfortunately, I think the only way I know of achieving very low
> latency is to write low-level code and minimize the abstraction
> layers. At some point, it's likely that your code would have to become
> somewhat soundcard-specific too because not all soundcards do the
> buffering the same way and you'll want to adapt to the soundcard
> buffer rather than let an abstraction layer handle it through more
> buffering. That's my experience anyway.
I tend to agree. Although it's not always soundcard specific -- often it
depends on the drivers, the host API and the operating system version too.
Managing all this logic in your app is non-trivial so we're trying to build
more of this knowledge into PortAudio.
PortAudio also offers a way to specify the low-level buffering parameters
directly for many native/host-APIs, which works around the issue you
describe. You don't have to use this mechanism (there is an abstract way to
specify latency that's completely portable) but if you do, you write a small
amount of buffer configuration code that is specific to each of the host
APIs you're interested in -- you can then surface driver specific buffer
parameters to the user if you want to let them tweak.
Ross.
More information about the celt-dev
mailing list