| John, gogins thanks for the memory allocation info.
How do I access the dopadr function from my opcode? or is using dopadr
just some sort of hack that i can add to my own version of Csound to allow
myself to deallocate memory used my my opcodes?
Again I am not at my
own computer so I don't have access to the code right now but I saw some
function in the Csound source that seemed to register the Opcodes, and it
included a dopadr function, so I assume it is possible to have dopadr
function for each opcode instance. It would seem like something you pass
with the registration
info of the plug-in, (ie. the info of what i/o the opcodes define and the
irate,krate,arate functions).
Though it doesn't seem like this is the case.
Is there some sort of documentation for this sort of thing somewhere that
I should reference?
I realize that Csound5 development is of the main importance now, I guess
I can just make this opcode ready for Csound5 use as a plug-in, but require that users
of 4.27 and earlier compile it into Csound, but I figured I'd ask and give
the plug-in for 4.27 one last chance.
thanks again,
Alex Norman
On Sat, 27 Dec 2003, gogins@pipeline.com wrote:
> The memory management functions will probably appear in the Csound API in
> the next version of Csound. This will mean you will be able to call them
> off the Csound pointer that Csound will set in your opcode structure.
>
> For now, use malloc and free your malloc'd memory in the dopadr function
> (the deinitialization function) which is called at the end of each Csound
> performance run. You should test your malloc'd pointers for zero, free them
> if they are not zero, and set them to zero after freeing them in case
> dopadr is called more than once.
>
>
> Original Message:
> -----------------
> From: Alex Norman anorman@cs.washington.edu
> Date: Sat, 27 Dec 2003 17:02:49 -0800 (PST)
> To: csound-dev@eartha.mills.edu
> Subject: [CSOUND-DEV:3823] Plugin Compile issues : auxalloc
>
>
> hello,
> I'm writing a plugin opcode and I've got everything working with csound
> 4.23f07 except Auxalloc.
>
> I don't know much about shared objects so I don't know how to include/link
> in the correct code. Basically I'm getting unidentified symbol errors when
> I run
> the plugin. but if i use malloc i don't have problems (though I don't
> have/know of a way to deallocate the memory when csound exits).
>
> anyways, what do I have to include in order to use auxalloc for a plugin?
> and do i just include the object files (which ones?) when i use the ln
> command to make the shared object (i'm just using the Makefile included in
> the
> distribution with some modifications to include my opcode), or do I
> include the C-code when I compile the object file for the opcode itself?
>
> I'm using linux if it matters.
>
> Thanks,
> Alex Norman
>
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> |