On Thu, Jun 18, 2009 at 2:45 PM, Lennart Poettering<[email protected]> wrote: > > So, how would I use this? I figure something like this: > > <snip> > 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(); > } > }
yep. > 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. that's not possible. the thread has to be ready to respond to the start of the JACK process cycle with RT-friendly timing. thats why "do_my_other_work_if_there_is_any()" is still under RT constraints *AND* needs to be designed knowing that it may be stealing processor time from other parts of the process cycle. you cannot just "dip into JACK and see if its time to process() - you must be ready for it when that time comes. > (we probably should stop the cross-posting, though) truncated to LAD. _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
