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

Jens M Andreasen jens.andreasen at chello.se
Mon Mar 14 22:29:41 UTC 2005

On Mon, 2005-03-14 at 17:34 +0100, Olivier Guilyardi wrote:

> Additionally, redesigning things so that the gui properly "shadows" the sequence 
> would oblige me to heavily optimize things. When adding a single track I 
> currently destroy the whole workspace and query the sequence to so that the gui 
> can redraw the whole thing, recreating all widgets.

Inserting the new widgets and having them propagate up thru the layout
engine in order to be redrawn is probably expensive whatever way you do

Scrapping the underlying structure (is "workspace" equal to "sequence_t"
here?) sounds a bit overdramatic though. I would instead like yo
envision something like blocks of 32 tracks × 32 beats that can be
extended vertically or horisontally as in:

  [ ]->[ ]->


  [ ]
  [ ]

or both ways:

  [ ]->[ ]->
  [ ]->[ ]->

In this fashion you could most of the time get away with adjusting
max_track and/or max_beat. A deleted track will stop sounding when you
hear the click from the mouse-button (although it may take a little
longer before the UI has rearranged itself.)

> By redesigning the gui, I would keep many widgets as they are and only create 
> some new ones, or destroy a few... This is very important, when you have a big 
> workspace (ie: 1k beats, 16 tracks), because things then get very slow the way I 
> currently do.

Yeah .. I can imagine that one to be slow :) OTOH, the whole concept is
pretty much broken by then ...

> I did think about this, but it required coding a lot of small functions for a 
> variety specialized routines, and I would also need to change the way files get 
> loaded (this last point is the main reason why I wanted to put the shadow within 
> the sequence itself). Anyway, although it requires some work, I think this is 
> the way to go.

Waiting for IO is a classic way of having the UI get stuck and
irresponsive. Therefore the nice people at gtk.org made this writeup:

   Monitoring IO


  c[]  //  Jens M Andreasen

More information about the Linux-audio-dev mailing list