[PD-dev] Sending list of floats out an outlet
Krzysztof Czaja
czaja at chopin.edu.pl
Tue Jul 16 17:39:37 CEST 2002
hi Ben,
Ben Bogart - FMPM/F1999 wrote:
...
> t_atom f_out[9];
> t_atom* myf = f_out;
> SETFLOAT(myf,f);
> SETFLOAT(myf+1,f+10);
> outlet_list(x->myobj.ob_outlet,&s_list,2,myf);
this is fine. Be cautious though -- whenever it comes to
incrementing myf (e.g. inside of a loop), do so _outside_ of
a SETFLOAT invocation -- this is a macro.
> where f is a floatarg to the method. Why is it that Guenter is using
> (t_atom*)&a_out rather than a_out as the *argv pointer? I copied the same
redundant, but does not hurt...
>>On Tue, 16 Jul 2002, Krzysztof Czaja wrote:
...
>>>if 'x' is your object pointer, 'n' is the number of floats, and
>>>you already store them in an array of atoms 'a', then the call
>>>will be
>>>
>>>outlet_list(x, &s_list, n, a);
oops, make it outlet_list(((t_object*)x)->ob_outlet, &s_list, n, a);
or as you did, i.e. more explicit, but avoiding a cast...
More information about the Pd-dev
mailing list