| Hi all,
I'm currently working on editing csound.c to work with csound5 cvs.
There are some issues I came across, mostly references to the global
ksmps and things like that instead of grabbing them from the passed in
void *csound. However, there is one that is tricky: playopen_mi()
references ksmps, but does not receive a void *csound in it's
arguments. For the time being I have it using csoundGetKsmps(&cglob),
but that's a hack to get by for now. (I've added a FIXME note that
should be easy to grep for).
Here are some compiler errors that I received:
Top/main.c:410: the use of `tmpnam' is dangerous, better use `mkstemp'
csound.o(.text+0xb9): In function `csoundPerform':
Top/csound.c:151: undefined reference to `runincomponents'
csound.o(.text+0x125): In function `csoundCompile':
Top/csound.c:166: undefined reference to `runincomponents'
csound.o(.text+0x79d): In function `csoundReset':
Top/csound.c:1000: undefined reference to `SfReset'
csound.o(.text+0x8a5): In function `csoundGetInputBuffer':
Top/csound.c:305: undefined reference to `inbuf'
csound.o(.text+0x510): In function `csoundSetEnv':
Top/csound.c:973: undefined reference to `warning'
The issues that these bring up for me are:
What is runincomponents? In csound4 cvs it seems to be defined in
musmon.c, and from looking at what changed between csound4 and csound5
versions of it, was runincomponents changed to frsturnon? (if so, then
I'll edit that in the csound.c file).
The other big issues here is SfReset. This is a cleanup function that
is now moved out to an Opcode plugin (sfont.c). Knowing the way sfont.c
is implemented, it seems then that it might be worth adding to the
csound API a method to appendCleanupFunction, so when csound goes to
load the plugin, the plugin can then call the API function on the passed
in void *csound to add any functions to run at the end of a csound run.
I've committed csound.c, load_opcodes.c, and ccsound.c into csound5 cvs
into the Top directory. To use these, you'll need to edit the
Makefile.in to remove references to jpff_glue.c and dl_opcodes.c and put
in references to these files. These files still need work and are not
yet ready as drop-in replacements of jpff_glue.c and dl_opcodes.c.
thanks!
steven |