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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Davis <paul@...>
Cc: <jack-devel@...>, Linux Audio Developers <linux-audio-dev@...>
Date: Thursday, June 18, 2009 - 6:46 pm

On Thu, 18.06.09 13:51, Paul Davis (paul@linuxaudiosystems.com) wrote:

> On Thu, Jun 18, 2009 at 12:21 PM, Lennart Poettering wrote:

That sounds like it was what I need.

So, how would I use this? I figure something like this:

void* my_thread(void*arg) {
for (;;) {
n = jack_cycle_wait(client);
process_my_data(n);
jack_cycle_signal(client, 0);
do_my_other_work_if_there_is_any();
}
}

jack_set_process_thread(client, foo_func);

Is that the rough idea? Hmm, with the other RT loops I have in PA I
usually just dispatch a single my own events and then immediately
check the IO device again, possibly dealing with the IO stuff first,
and only after finishing that I dispatch the next of my own events and
immediately check for IO again. That way I make sure that IO always
takes priority over dispatching those events. i.e. something along the
lines of:

void *my_thread(void *arg) {
for (;;) {
n = how_much_shall_i_process();
if (n > 0) {
process_my_data(n);
continue;
}
n = how_many_events_to_dispatch();
if (n > 0) {
process_one_event();
continue;
}
wait_for_io();
}

So, to map this to JACK, I would prefer if jack_cycle_wait() would
also exist in a non-blocking variant. i.e. something that can return 0
if there's nothing to process, but doesn't necessarily wait.

(we probably should stop the cross-posting, though)

Lennart

--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] jack2's dbus name, Stéphane Letz, (Mon Jun 15, 9:05 am)
Re: [LAD] jack2's dbus name, Lennart Poettering, (Mon Jun 15, 12:59 pm)
Re: [LAD] jack2's dbus name, Stéphane Letz, (Mon Jun 15, 1:38 pm)
Re: [LAD] jack2's dbus name, Lennart Poettering, (Mon Jun 15, 2:37 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 4:21 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Nedko Arnaudov, (Fri Jun 19, 7:08 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Paul Davis, (Thu Jun 18, 5:52 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 6:46 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Paul Davis, (Thu Jun 18, 6:49 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 7:13 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Paul Davis, (Thu Jun 18, 9:41 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 10:34 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Fons Adriaensen, (Thu Jun 18, 11:28 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 11:44 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Stéphane Letz, (Fri Jun 19, 6:45 am)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Fri Jun 19, 1:00 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Fri Jun 19, 1:43 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Stéphane Letz, (Fri Jun 19, 2:03 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Fri Jun 19, 2:13 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Paul Davis, (Thu Jun 18, 11:57 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Fri Jun 19, 12:28 am)
Re: [LAD] [Jack-Devel] jack2's dbus name, Paul Davis, (Fri Jun 19, 2:39 am)
Re: [LAD] [Jack-Devel] jack2's dbus name, Jussi Laako, (Thu Jun 18, 5:12 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 7:00 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Jussi Laako, (Thu Jun 18, 8:28 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Florian Schirmer, (Thu Jun 18, 9:20 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Jussi Laako, (Thu Jun 18, 11:03 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 8:46 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Jussi Laako, (Thu Jun 18, 10:56 pm)
Re: [LAD] [Jack-Devel] jack2's dbus name, Lennart Poettering, (Thu Jun 18, 10:59 pm)
Re: [LAD] jack2's dbus name, Fernando Lopez-Lezcano, (Mon Jun 15, 5:16 pm)
Re: [LAD] jack2's dbus name, Lennart Poettering, (Mon Jun 15, 5:34 pm)
Re: [LAD] jack2's dbus name, Fernando Lopez-Lezcano, (Mon Jun 15, 6:37 pm)
Re: [LAD] jack2's dbus name, Lennart Poettering, (Mon Jun 15, 6:54 pm)
Re: [LAD] jack2's dbus name, alex stone, (Mon Jun 15, 6:36 pm)
Re: [LAD] jack2's dbus name, Jussi Laako, (Tue Jun 16, 6:19 pm)
Re: [LAD] jack2's dbus name, Stéphane Letz, (Mon Jun 15, 3:03 pm)