Hi All, Just an update, I tested outside of using the API, using the commandline, and am getting a bad Segfault where csound hangs and needs to get killed with Task Manager (this is on WinXP). So the problem is not exactly API related I think. Investigating now, and have attached the CSD to this email. (If run, it will die when the instr 2 is run that sends an "e" event). steven On Mon, Jun 30, 2008 at 1:15 AM, Steven Yi wrote: > Hi All, > > I'm currently working on using the Csound API from blue and I'm > finding a tricky situation. I'm running this code in a thread: > > while(csound.PerformKsmps() == 0 && keepRunning) { > counter++; > if(counter > updateRate) { > > RenderTimeManager.getInstance().updateTimePointer((float) > csound.GetScoreTime()); > counter = 0; > } > } > csound.Stop(); > csound.Cleanup(); > csound.delete(); > > However, if the CSD that is being run has an instrument that sends an > "e" event like: > > event "e", 0, 0, 0.1 > > in it's code, it seems to immediately kill Csound. Then the code in > the thread tries to do another PerformKsmps() and will cause an access > violation of some sort, killing the entire process (i.e. will kill > Csound and blue together). > > I'm not sure what is a good way around this, nor how the event opcode > processes events. I asssume the event opcode immediately processes > instead of batching and processing on a ksmps boundary? > > Anyone have ideas to get around this or if I have something wrong? > > Thanks! > steven >