Hi All, Just wanted to say these examples are really good thing IMO, and if they were accompanied with texts they could make a really nice manual or book I think. Thanks for going through all of these examples! steven On 10/11/05, Iain Duncan wrote: > > I have attached slightly modified versions of the examples. The changes > > are mainly fixes related to error handling, but I also made use of the > > new bus interface in cs_simple_3. Of course, using tables is by no means > > a bad method, but why not have examples of more different approaches ? > > In addition, I replaced the empty loop that was used for busy waiting, > > as it has two major disadvantages: the execution time depends on the speed > > of the CPU, and even worse, the compiler may remove the loop completely > > knowing that it does nothing. > > Thanks again for all the help. I agree that having more approaches to > getting data in and out is a good thing, though I think I may move that > stuff into example 4, again to just spread out the new info to the > learner ( me, among others! ). The parser error function looks very > useful, so I will leave that in as is. I was actually planning on doing > pretty much a similar thing that you added with the mutex and the csound > pointer and the command args all in one structure, and it looks like the > csound thread functions are more appropriate for this example then the > raw pthread stuff, so I think I will try to redo example three with your > error handling, thread functions, and global csound structure, but > saving the new bus code for the example 4 ( which will be example 3 with > more examples of ways to use the api ). > > However, I have some questions on the differences if you have time. > > For what reason do we now call: > csoundInitialize( NULL, NULL, 0 ); > at the beginning before spawining threads? > > What do csoundWaitThreadLockNoTimeout( cs_data.mtx ); and > csoundNotifyThreadLock( cs_data.mtx ); do exactly? I assume that the > first is the same as a blocking wait on a pthread mutex? And for what > purpose do we use them between joining the csound thread and the display > thread? > > Is there a no-wait version of the csound mutex function too? One where > we try for the mutex, and then just continue on if we don't get it? > > Thanks > Iain > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net