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 - 17:41:13 EEST

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

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

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