Re: Minimum reasonable latency Was: Re: ZynAddSubFX was: Re: [linux-audio-dev] some new soundfiles on-line

From: Alfons Adriaensen <fons.adriaensen@email-addr-hidden>
Date: Thu May 19 2005 - 18:40:41 EEST

On Thu, May 19, 2005 at 05:25:37PM +0200, Florian Schmidt wrote:

> ...
> The keypress cannot be scheduled for period N+1 (with constant delay) as
> the process_n() (which prepared the buffer that will be audible during
> period N+1) is already done. It can be put into the buffer by
> process_n+1(). This buffer will be audible after Irq N+2

> This breaks afaics the rule of _reliably_ constant delay. OTOH i don't
> qute grok it. Care to roll it out?

You shouldn't check for events int jack_process(), but in a separate
thread, linked to jack_process() using a lock-free circular buffer for
the [event+timestamp] data.

To get really accurate timing in all cases, this thread should even have
higher priority than the one created by jackd (*), otherwise all events that
occur while a jack_process() is running will be delayed until the end
of all processing for the current cycle.

(*) but lower than jackd's master thread. This is currently not possible
since the difference in priorities is just 1.

-- 
FA
Received on Thu May 19 20:15:13 2005

This archive was generated by hypermail 2.1.8 : Thu May 19 2005 - 20:15:14 EEST