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

Alfons Adriaensen fons.adriaensen at
Thu May 19 14:41:13 UTC 2005

On Thu, May 19, 2005 at 04:06:19PM +0200, Florian Schmidt wrote:

> I don't know of any _reliable_ constant delay (jitter free) way to
> schedule events happening during period N for playback during period
> N+1. If anyone does, please enlighten me.

Call jack_frame_time() when you get the event, and add one period.
Put the event in a queue, together with this timestamp.

In your jack_process() : set t0 = jack_last_frame_time(), then handle
all events that fall before t0 + period. The sample index for the
event is its timestamp - t0  (or O if this happens to be negative).


More information about the Linux-audio-dev mailing list