[Cs-dev] Simple APi question
Date | 2006-03-20 17:58 |
From | jpff@codemist.co.uk |
Subject | [Cs-dev] Simple APi question |
The csound.h file seems to suggest that the sequence csound = csoundCreate(NULL); if (!csoundCompile(csound, nxt-1, argv)) csoundPerform(csound); csoundDestroy(csound); should be used to call from a C/C++ program. However while this does run for me it crashes on exit. If I omit the csoundDestroy(csound) call it does not crash but I cannot call again. What have I failed to understand? ==John ffitch ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-03-20 18:24 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Simple APi question |
I'd say if you run the csoundPerform(), it'll go to the end of the score, so in order to perform again, you would need to do csoundRewind(). Not sure why csoundDestroy() is crashing it. It does not crash other applications (such as cstclsh). Victor At 17:58 20/03/2006, you wrote: >The csound.h file seems to suggest that the sequence > csound = csoundCreate(NULL); > if (!csoundCompile(csound, nxt-1, argv)) > csoundPerform(csound); > csoundDestroy(csound); >should be used to call from a C/C++ program. However while this does >run for me it crashes on exit. If I omit the csoundDestroy(csound) >call it does not crash but I cannot call again. What have I failed to >understand? >==John ffitch > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-03-20 19:03 |
From | John ffitch |
Subject | Re: [Cs-dev] Simple APi question |
But there is no csoundRewind() defined. There is a csoundCleanup but its r\^ole is unclear. Surely if I dp not intent rerunning teh score then there is no need for a rewind anyway. Getting more confused by teh minute. ==John ff On Mon, 20 Mar 2006, Victor Lazzarini wrote: > I'd say if you run the csoundPerform(), it'll go to the end of > the score, so in order to perform again, you would need to > do csoundRewind(). Not sure why csoundDestroy() is crashing > it. It does not crash other applications (such as cstclsh). > > Victor ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-03-20 19:41 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] Simple APi question |
I assume that you are calling csoundInitialize() ? The following does work for me: csoundInitialize(&argc, (char***)&argv, CSOUNDINIT_NO_SIGNAL_HANDLER); csound = csoundCreate(NULL); main_st = csoundPreCompile(csound); // Set Csound callbacks here // One complete performance cycle main_st = csoundCompile(csound, argc, argv); if (!main_st) { while (csoundPerformKsmps(csound) == 0); } csoundDestroy(csound); Calling csoundPerform() without the while loop should not be any different I would think. Anthony Kozar anthonykozar AT sbcglobal DOT net ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-03-22 11:17 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Simple APi question |
Attachments | None |