[linux-audio-dev] Lock-free gtk/jack interaction

Jens M Andreasen jens.andreasen at chello.se
Mon Mar 14 00:58:09 UTC 2005

On Sun, 2005-03-13 at 22:12 +0100, Olivier Guilyardi wrote:
> Hi,

> I'm not sure this is a very clear description, but do you have any advice about 
> this kind of issue ? Is my idea a good one ?

Looking at your screenshot and reading the labels I wonder why the UI is
so concerned about what jack is doing. I would have thought jack_run
will do whatever the UI appears like, no? The exception being time
information/sample count needed to update blinking-lights and

   g_timeout_add ( 50,
		   (void*)some_data );

For pressing buttons I see no reason why you should not just go ahead
and update the structure that jack_run can see. Assuming this is a
simple integer update.

Say you need to load files, malloc and whatnot for a new track. Fine, do
all that first and then let jack_run insert the new track into the main
structure before doing the actual run.

  if(p){ // we have a new track to insert
      p = NULL; // notify it is done

  if(q){ // we should delete one track
      q = NULL;

  // start of jack_run


  c[]  //  Jens M Andreasen

More information about the Linux-audio-dev mailing list