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

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: RE: [linux-audio-dev] Re: Hammerfall latency confusion in german"Keyboards" articles ?
From: Ivica Bukvic (ico_AT_fuse.net)
Date: Sun Nov 02 2003 - 03:30:26 EET


> -----Original Message-----
> From: linux-audio-dev-bounces_AT_music.columbia.edu
[mailto:linux-audio-dev-
> bounces_AT_music.columbia.edu] On Behalf Of Benno Senoner
> Sent: Saturday, November 01, 2003 5:03 PM
> To: linux-audio-dev_AT_music.columbia.edu
> Subject: [linux-audio-dev] Re: Hammerfall latency confusion in
> german"Keyboards" articles ?
>
> hmmm, I'll try to respond to my own question:
>
> (hoping having done the math correctly):
> alsa-kernel/pci/rme9652/hdsp.c:
> hdsp->period_bytes = 1 <<
((hdsp_decode_latency(hdsp->control_register)
> + 8));
>
> latency register is 3 bit long, set all 3 bit to 0 and you get the
> lowest possible latency:
> period_bytes=1 << (0+8) = 256
> we are talking about 32bit words (24bit audio embedded in 32bit words)
> thus we need to divide bytes / 4
> we get 64.
> one period = one fragment thus I assume the minimum buffer size = 2 x
64
> = 128 samples which
> at 44100 = 3msec. (the keyboards test were done at 44.1kHz).

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. 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...

Ico


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Nov 02 2003 - 03:29:35 EET