[Ardour-users] WAV files, xruns

Anthony DiSante orders at nodivisions.com
Fri Feb 20 20:26:58 PST 2004


Anthony DiSante wrote:
>>> So can I tell what latency I've achieved based on those numbers?  I've
>>> seen people on this list say, "I get X ms latency," etc.  Is there a
>>> formula?  I assume it's something divided by the sample rate (in kHz)
>>> in order to get a result in ms.
>>
>>
>> Right.  Check `man jackd'...
>>
> So...
> 
> Input latency
> = period / rate
> = 2048 / 48 kHz
> = 43 ms
> 
> Output latency
> = n * period / rate
> = 2 * 2048 / 48 kHz
> = 85 ms
> 

OK, I'm a knucklehead.  I only started using the --realtime option when I 
started using the -p option (I didn't know about --realtime before that). 
When I use --realtime, I can use a period as low as 512 without xruns.  (And 
jackd actually gives me an error and quits if I try to set it lower than that.)

So... my revised calculations:

Input latency
= period / rate
= 512 / 48 kHz
= 11 ms

Output latency
= n * period / rate
= 2 * 512 / 48 kHz
= 21 ms

It's not 2ms, but it's considerably lower.

Also... it seems interesting to me that if I use a lower sample rate, the 
latency goes up.  It would seem more intuitive to me that if it's sampling 
less often, working less hard, the latency would improve (go down).  But no? 
  Where am I going wrong?

-Anthony
http://nodivisions.com/



More information about the Ardour-Users mailing list