On Tuesday 16 April 2013 at 17:36, Edward Costello wrote:
Hi,Sorry to ask a silly question, but I've been pulling my hair out a bit with trying to get a string input to an opcode, can anyone tell me what I'm doing wrong here, the name variable when I check in the debugger is always 0.typedef struct myOpcode
{
OPDS h;
MYFLT *iFileName;
} myOpcode;
int myOpcode_init(CSOUND *csound, myOpcode *p)
{
char name[1024] = {0};
csound->strarg2name(csound, name, p->iFileName, "myOpcode.",
p->XSTRCODE);
return OK;
}
int myOpcode_process(CSOUND *csound, myOpcode *p)
{
return OK;
}
static OENTRY localops[] = {
{
"myOpcode",
sizeof(myOpcode),
3,
"S",
"S",
(SUBR)myOpcode_init,
(SUBR)myOpcode_process,
NULL
}
};
--Edward Costello