| Hi,
I'm working on LADSPA and DSSI host plugins for csound, and I need to
remove some static variable. What's the correct way to do this in C not
C++?
Thanks,
Andrés
On Sat, 2005-05-28 at 15:26, Michael Gogins wrote:
> Those responsible for opcodes -- plugin opcodes, or builtin opcodes -- may need to make changes in their code now that people will be using Csound 5 in multiple instantiations, e.g. as several csoundvst_api objects in PD or multiple CsoundVST plugins in Cubase.
>
> If you have objects or other variables that are global to your plugin module, you will need to change these from single objects to a table of objects indexed by the Csound instance. The easiest way to do this is to declare
>
> std::map myobject;
>
> instead of
>
> MyGlobalObject myobject
>
> in your code.
>
> Then you would access it
>
> myopcodefunc(void *csound, MyOpcodeStruct *struct)
> {
> myobject[csound].doSomething();
> }
>
> instead of
>
> myopcodefunc(void *csound, MyOpcodeStruct *struct)
> {
> myobject.doSomething();
> }
>
> Of course there are "C"-only ways of doing this.
>
> I am fixing up the mixer and STK opcodes to work this way.
>
> Regards,
> Mike
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> 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 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |