[LAD] [Jack-Devel] jack2's dbus name

Paul Davis paul at linuxaudiosystems.com
Thu Jun 18 23:57:37 UTC 2009


On Thu, Jun 18, 2009 at 7:43 PM, Lennart Poettering<mzynq at 0pointer.de> wrote:
>
> <snip>
> for (;;) {
>    n = jack_client_wait()
>    process(n);
>    jack_cycle_signal();
>    while (jack_frames_since_cycle_start() < threshold) {
>        if (no_private_events_to_process())
>                break;
>        process_one_of_my_private_events();
>    }
> }
> </snip>

how is this functionally different than adding 1 period of latency to
every event, then
processing every event marked to occur during a given process cycle
*within* that process cycle?

this is precisely what happens with MIDI and OSC sequencing. i.e:

now = 0;
for (;;) {
    n = jack_cycle_wait ();
    while (events_to_process (now, now+n)) {
           process_event ();
    }
    process_data ();
    now += n;
    jack_cycle_signal ();
}

as i mentioned, this is fundamentally what any MIDI sequencer that
uses JACK MIDI is doing. the latency of the event is fixed, and there
is close to zero jitter.

no "waiting after", no potential stealing of cycles outside the
process cycle, no scheduling issues.



More information about the Linux-audio-dev mailing list