On Wednesday 17 May 2006 14:27, Michael Gogins wrote: > I should add, that CsoundVST requires noFLTKThreads=1. It is actually possible to have the effects of noFLTKThreads=1 enabled at run-time, rather than compiling the widgets plugin with noFLTKThreads=1 (in fact, the csound5gui frontends assumes noFLTKThreads=0). To disable the use of a separate thread for the widget opcodes, run this code between csoundPreCompile() and csoundCompile(): csoundCreateGlobalVariable(csound, "FLTK_Flags", sizeof(int)); *((int*) csoundQueryGlobalVariable(csound, "FLTK_Flags")) = 28; Replace the 28 with 30 to disable the FLTK graphs, or 3 to get rid of both the widgets and the graphs. Additionally, if using 274 instead of 28, then as long as csoundCompile() is called from the same thread that also calls Fl::wait(), it is possible to get the widgets working regardless of what thread is used for performing. Here is the complete list of flags: /** * FLTK flags is the sum of any of the following values: * 1 (input): disable widget opcodes by setting up dummy opcodes instead * 2 (input): disable FLTK graphs * 4 (input): disable the use of a separate thread for widget opcodes * 8 (input): disable the use of Fl::lock() and Fl::unlock() * 16 (input): disable the use of Fl::awake() * 32 (output): widget opcodes are used * 64 (output): FLTK graphs are used * 128 (input): disable widget opcodes by not registering any opcodes * 256 (input): disable the use of Fl::wait() (implies no widget thread) */