[linux-audio-dev] Re: Hammerfall latency confusion in german"Keyboards" articles ?

David Olofson david at olofson.net
Sun Nov 2 03:21:18 UTC 2003


On Sunday 02 November 2003 02.30, Ivica Bukvic wrote:
[...]
> All that seems to be correct. However AFAIK, the higher the
> sampling rate the lesser amount of time do those 128 samples
> encompass. Hence if you have double the sampling rate 88200Hz, then
> 128 samples ends up being only ~1.5ms. Of course you could go
> really crazy and do 192000, in which case latencies would be
> sub-millisecond.

But the sample rate *was* specified to 44.1 kHz in this case, wasn't 
it...?


> There is obviously still a question whether any
> kernel on the face of earth would be able to provide soundcard with
> data in time in order to avoid dropouts...

You can process one sample at a time at 44.1 kHz on most decent PCs 
running RT-Linux, RTAI or some other "industrial strength" RTOS. 
Those get the latencies practically all the way down to the hardware 
limits, meaning worst case latencies of less than 10 microseconds on 
well built Celeron or better systems. Also note that the x86 arch 
sucks at this pretty much by design. Alpha, PPC and others can get 
even lower latencies.

Of course, you can't use normal PCI busmaster DMA for that, since 
there's a minimum burst size limit at 64 bytes or something. (Though 
you could most probably get around that if the sound card is designed 
for it, and/or does DMA with a fully programmable chip.) PIO or ISA 
DMA works just fine, but that's generally only available on old ISA 
sound cards.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---





More information about the Linux-audio-dev mailing list