| I like the idea of csoundInit being optional.
I think csoundPreCompile would be a more descriptive name.
Original Message:
-----------------
From: Istvan Varga istvan_v@mailbox.hu
Date: Sat, 05 Feb 2005 20:46:32 +0100
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] Csound API -- modules
gogins@pipeline.com wrote:
> If one can't always do csoundReset and what you propose for
> csoundInitialize at the same time, then they need to be different calls,
csoundReset is supposed to free all allocated memory and other resources,
unload modules, and in general do everything that is done by csoundDestroy,
with the exception of destroying the instance.
On the other hand, the init function, while implies csoundReset (and does
that at first), would allocate memory and load modules. Now, deleting the
csound instance after a csoundReset would be safe, but doing the same after
an init call would be leaking resources.
> but I would prefer a more descriptive name, like csoundInitializeModules
or
> something.
The function is not strictly limited to loading modules. It is a general
initialization call that prepares an instance to be used by csoundCompile,
thus naming it csoundInitializeModules would be confusing. At this time,
I'd prefer the name 'csoundInit', but if you can suggest a name that is
longer
and more descriptive, I will use that.
By the way, there is no technical reason why csoundInit could not be made
optional, making all the following uses valid:
1.
csoundCreate
csoundInit
[do something with the configuration settings]
csoundCompile
csoundPerform
csoundDestroy
2.
csoundCreate
csoundCompile <-- will detect that csoundInit was not called
and call it automatically
csoundPerform
csoundDestroy
3.
csoundCreate
[csoundInit] <-- optional
csoundCompile
csoundPerform
[csoundInit] <-- optional
csoundCompile
csoundPerform
[csoundInit] <-- optional
csoundCompile
csoundPerform
[repeat Init, Compile, Perform any number of times]
csoundDestroy
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |