Re: [Jack-Devel] how often should one call jack_port_get_latency_range()
On Wed, Jul 13, 2011 at 9:30 AM, Robin Gareus <[hidden]> wrote:
> G'day!
>
> I have a JACK client with a single audio-input-port (no output). This
> input is used to parse Linear-Time-Code. For synchronization the
> application needs to know the capture-latency of said audio-port.
>
> So the question is: how often should the application call
> jack_port_get_latency_range() ?
>
> Currently it does so in every process_callback.
>
> Is this the correct solution?
no.
> The overhead may be minimal, but still it feels somewhat wrong to poll
> it during every process() cycle. Is there a callback that can be
> subscribed to to get notified of changes to port-latencies?
From the documentation of jack_set_latency_callback():
* Tell the Jack server to call @a latency_callback whenever it
* is necessary to recompute the latencies for some or all
* Jack ports.
1310564105.13627_0.ltw:2,a <CAFa_cKkq217khh+kWXaxePxxfUaPDpxsL3bgg1+2VgTaAp7T8g at mail dot gmail dot com>