[PD-dev] sending data out using sprintf
nosehair911 at bellsouth.net
nosehair911 at bellsouth.net
Fri Jun 22 04:57:35 CEST 2007
I am trying to send some data out of an outlet using a symbol pointer. I have tried using sprintf like
martin suggested with little succes. I am sure I am the one doing something wrong. I am getting a
pointer symbol but I am not able to convert the pointer back. In external#1 I have:
The out ----------------
IplImage *frame;
char symstr[10];
t_symbol *sym;
sprintf(symstr, "%p", frame);
sym = gensym(symstr);
outlet_symbol(x->m_outFrames, sym);
With this I get an address like:
symbol 0x1159da0
...but on the conversion in external#2 I get the problem. The conversion looks like:
The in-----------------------
IplImage *in_frame;
x->in_frame = (IplImage *)atol(s->s_name);
post("frame %s", x->in_frame);
post("symbol %s",s->s_name);
...with this I get this:
frame (null)
symbol 0x1159da0
So I'm getting the symbol in, but its not converting into "in_fame."
Does anyone know what I am doing wrong or a way to use Pd's A_POINTER. I have looked at
Gem and pdp but I cant figure it out.
Thanks,
Alain
More information about the Pd-dev
mailing list