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

From: Jens M Andreasen <jens.andreasen@email-addr-hidden>
Date: Mon Mar 14 2005 - 02:58:09 EET

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
measure-count.

   g_timeout_add ( 50,
                   my_time_function,
                   (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
Received on Mon Mar 14 04:15:14 2005

This archive was generated by hypermail 2.1.8 : Mon Mar 14 2005 - 04:15:14 EET