On Monday 08 May 2006 10:48, Victor Lazzarini wrote: > Widget opcodes seem to work OK with Winsound. I have not yet > tried csound5gui because it requires FLTK 1.1.7 and the stable > version that works on all OSXs is 1.1.5. I have not ever tried > 1.1.7 but 1.1.6 was not working on OSX 10.4 as far as the > widget opcodes were concerned. It will require some time > to check which I will not have today, but perhaps tomorrow. I have created a version of the .fl files that should be compatible with FLTK 1.1.5 at the expense of some minor loss of GUI functionality. Just copy the files from the attachment to frontends/fltk_gui/, overwriting any already existing files, and edit SConstruct to remove the now unneeded check for 1.1.7. With these changes, you can have a local version of the code that builds with older FLTK releases and is suitable for testing on OS X. Of course, it would be even better to find out how to compile FLTK 1.1.7 on the Mac. Of particular interest are two issues: why does disabling "perform in a separate thread" result in a hang on OS X even if FLTK opcodes are not used, and whether the new experimental code for enabling the widget opcodes even with a separate thread (by not calling Fl::wait() in widgets.cpp) works. > I'll try and check the Jack issues you mentioned in the other > list. Thanks, that would be really nice, especially a comparison with the 5.01 "release" version that was reported to be broken. As I suspect this problem (and possibly some others) may be caused py the pthread_mutex_* functions behaving differently on OS X, it may also be worth checking if the Csound API thread lock functions work correctly there. For example, what does the following simple test program do ? For me, the output is: Localisation of messages is disabled, using default language. time resolution is 0.758 ns The time is now 1.96397e-05 Lock() returns 0 The time is now 0.000197836 Lock() returns 110 The time is now 1.50245 Creating thread ... Lock() returns 0 The time is now 2.0065 Lock() returns 110 The time is now 2.51041 Lock() returns 0 The time is now 2.51047 Lock() returns 0 The time is now 2.51049 Joining thread ... return value is 123 Average Lock/Unlock time is 0.14081 us // --------------------------------------------------------------------- #include "csound.hpp" #include static uintptr_t threadFunc(void *userData) { csoundSleep(500); ((CsoundThreadLock*) userData)->Unlock(); return (uintptr_t) 123; } int main() { csoundInitialize(0, 0, 0); CsoundThreadLock threadLock(0); CsoundTimer t; std::cerr << "The time is now " << t.GetRealTime() << std::endl; std::cerr << "Lock() returns " << threadLock.Lock(1000) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; std::cerr << "Lock() returns " << threadLock.Lock(1500) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; std::cerr << "Creating thread ..." << std::endl; void *thread = csoundCreateThread(threadFunc, (void*) &threadLock); std::cerr << "Lock() returns " << threadLock.Lock(1500) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; std::cerr << "Lock() returns " << threadLock.Lock(500) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; threadLock.Unlock(); std::cerr << "Lock() returns " << threadLock.Lock(1000) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; threadLock.Unlock(); threadLock.Unlock(); std::cerr << "Lock() returns " << threadLock.Lock(1000) << std::endl; std::cerr << "The time is now " << t.GetRealTime() << std::endl; threadLock.Unlock(); std::cerr << "Joining thread ... "; int retval = (int) csoundJoinThread(thread); std::cerr << "return value is " << retval << std::endl; double oldTime = t.GetRealTime(); for (int i = 0; i < 1000; i++) { threadLock.Lock(); threadLock.Unlock(); } double newTime = t.GetRealTime(); std::cerr << "Average Lock/Unlock time is "; std::cerr << (newTime - oldTime) * 1000.0 << " us" << std::endl; return 0; }