Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] scsort and scxtract

Date2005-10-27 21:33
FromMichael Gogins
SubjectRe: [Cs-dev] scsort and scxtract
For the sake of consistency with other uses of the API, I suggest taking an existing Csound instance, and documenting the required sequence of calls.

Regards,
Mike

-----Original Message-----
From: Istvan Varga 
Sent: Oct 27, 2005 3:57 PM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] scsort and scxtract

Anthony Kozar wrote:
> I assume that you mean util/[sx]main.c here.  OK, I will hold off on changes
> for now, but I would like to do some testing and see if these functions can
> be made reliable for the Cs5 release.
> 
> I note that you have already modified the main stubs above to create Csound
> instances, etc., which I anticipated.  Are you aware of anything else
> specifically that needs to be done?

It depends on how the functions are intended to be used. One possiblity
is using an existing CSOUND* instance and calling them from the host
application between csoundPreCompile() and csoundReset(); in this case,
the existing functions may be suitable with a few minor changes (such
as saving, setting up, and restoring exitjmp in CSOUND, and returning an
integer error code).
Alternatively, I could write functions that wrap scsort/scxtract by
creating a Csound instance, calling csoundPreCompile(), setting exitjmp,
running scsort or scxtract, and finally destroying the temporary instance;
in this case, the new API functions would not take a CSOUND* pointer, only
the files.
Of course, there may be other options as well. What do you suggest ?


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-28 18:36
FromAnthony Kozar
SubjectRe: [Cs-dev] scsort and scxtract
Either way would be OK but for consistency and so that hosts can have more
control over memory usage, I agree that it should work like other parts of
the API.  (Create an instance, call PreCompile, then scsort, etc.)

This is how I did things with Cscore as well -- now you have me wondering if
maybe I need to call csoundPreCompile before using it as well.

Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://akozar.spymac.net/


Michael Gogins wrote on 10/27/05 4:33 PM:

> For the sake of consistency with other uses of the API, I suggest taking an
> existing Csound instance, and documenting the required sequence of calls.
> 
> Regards,
> Mike
> 
> -----Original Message-----
> From: Istvan Varga 

> It depends on how the functions are intended to be used. One possiblity
> is using an existing CSOUND* instance and calling them from the host
> application between csoundPreCompile() and csoundReset(); in this case,
> the existing functions may be suitable with a few minor changes (such
> as saving, setting up, and restoring exitjmp in CSOUND, and returning an
> integer error code).
> Alternatively, I could write functions that wrap scsort/scxtract by
> creating a Csound instance, calling csoundPreCompile(), setting exitjmp,
> running scsort or scxtract, and finally destroying the temporary instance;
> in this case, the new API functions would not take a CSOUND* pointer, only
> the files.
> Of course, there may be other options as well. What do you suggest ?



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net