| The extensions article might not be up-to-date as it was written at a
time
when the API was changing quite quickly. But I'm sure my opcodes and
from others all have to use this.
Victpr
On 22 Oct 2009, at 15:37, Rory Walsh wrote:
> Thanks guy. Can I ask Victor how you get away with it in some of your
> opcodes, and also in the code from your extensions to Csound article?
>
> 2009/10/22 Victor Lazzarini :
>> It's
>>
>> csound->GetKsmps(csound).
>>
>> Victor
>>
>> On 22 Oct 2009, at 14:46, Rory Walsh wrote:
>>
>>> Can anyone tell me why the following code results in an error saying
>>> too few arguments passed to GetKsmps()? I'm try to create a simple
>>> template for some my students and can't figure why it think GetKsmps
>>> accepts any arguments at all?
>>>
>>> #include "csdl.h"
>>>
>>> typedef struct _sndWrite {
>>> OPDS h;
>>> MYFLT *outsig;/* output pointer */
>>> MYFLT *insig;/* input */
>>> } sndWrite;
>>>
>>> int sndWrite_init(CSOUND *csound, sndWrite *p){
>>> return OK;
>>> }
>>>
>>> int sndWrite_process(CSOUND *csound, sndWrite *p)
>>> {
>>> int i;
>>> MYFLT *in = p->insig;
>>> MYFLT *out = p->outsig;
>>>
>>> int ksmps = csound->GetKsmps();
>>> for(i=0; i < ksmps; i++){
>>> out[i] = in[i];
>>> }
>>> return OK;
>>> }
>>>
>>> #define S(x) sizeof(x)
>>> static OENTRY localops[] = {
>>> { "sndWrite", S(sndWrite), 4, "a", "a", (SUBR)sndWrite_init, NULL,
>>> (SUBR)sndWrite_process }
>>> };
>>> LINKAGE
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart
>>> your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9 - 12, 2009. Register
>>> now!
>>> http://p.sf.net/sfu/devconference
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart
>> your
>> developing skills, take BlackBerry mobile applications to market
>> and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |