In fact, it may be possible to use FLTK opcodes and perform in a separate thread, by disabling the use of Fl::wait() in the widgets plugin, but using Fl::lock() and Fl::unlock() around FLTK operations at performance time. csoundCompile() still needs to be called from the main thread (this is where most windows etc. are created in the orchestra header), but after that performing in a separate thread may work as long as the widgets never call Fl::wait(). The graphs should probably also be disabled. It is already possible to control whether the widgets plugin calls Fl::wait(), using the "FLTK_Flags" interface, but I have not tested this so far. On Tuesday 02 May 2006 12:56, Istvan Varga wrote: > On Tuesday 02 May 2006 03:55, Michael Gogins wrote: > > > I'm not completely sure how Qt's GPL would play with Csound's LGPL. > > It should not be a problem in a GPL licensed host application. A more > interesting issue is how well two separate toolkits (each with its own > event processing etc.) would coexist in the same process, assuming > that the discussion is still about solving the use of widget opcodes > in a GUI frontend. I think it is safest if the GUI frontend uses FLTK, > and both it and the widgets plugin use the same dynamic FLTK library. > If the host is able to perform both with and without using a separate > audio thread (I did implement this in my Csound GUI), and uses the > "FLTK_Flags" variable to control the threading behavior of the FLTK > plugin, then the widget opcodes should work reliably. It is also > possible to check "FLTK_Flags" after calling csoundCompile() to find > out if using a separate thread is safe (i.e. depending on whether > there are FLTK graphs or opcodes, or not), and then choose the threading > or non-threading mode automatically. So, here is a short summary of what > is needed: > - use FLTK in the host application > - use a dynamic FLTK library compiled with --enable-threads > - do not use a separate audio thread when performing an orchestra > that contains widget opcodes, or FLTK displays are enabled; it is > still OK to offer a multi-threaded mode for non-FLTK orchestras > - use "FLTK_Flags" to control the widgets plugin