On Sunday 11 December 2005 23:47, Victor Lazzarini wrote: > Thanks a lot. The CsoundArgVList class is new as well isn't > it? I hadn't seen it before. I presume in Python the idea will > be more or less the same (deriving a class and overriding > its methods). CsoundArgVList and other new "glue" classes are declared in interfaces/csound.hpp and implemented in interfaces/csound.cpp; some examples for these would probably be useful. Also, as an alternative to using the callback wrapper class, it is possible to collect messages in a buffer that can be polled after calling API functions that may possibly print messages. An example: Csound cs = new Csound(); // if the integer argument is non-zero, the messages are // also written to stdout/stderr cs.EnableMessageBuffer(0); cs.Compile("test.csd"); int n = cs.GetMessageCnt(); // number of pending messages for (int i = 0; i < n; i++) { // cs.GetFirstMessage() is the oldest message in the buffer, // and cs.GetFirstMessageAttr() is its attributes java.lang.System.err.print(cs.GetFirstMessage()); // remove message from the list, advance to next one cs.PopFirstMessage(); } cs.Reset(); // check for messages again // ... // free buffer when no longer used before 'cs' is deleted // to avoid memory leaks or crashes cs.DestroyMessageBuffer(); Of course, this has the disadvantage that you need to explicitly check for messages after API calls, and if the call takes a long time (e.g. running an utility) the messages will not be printed until it returns. Also, the message buffer and the callback wrapper cannot be used at the same time with the same Csound instance, as both use the host data pointer. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net