why is it even possible that in three calls to the 'dsp' method in three different objects, two of them receive the same t_signal pointer pointer ?
static void dsp (BFObject *bself, t_signal **sp) { post("dsp bself=%p signal**=%p",bself,sp); }
gives me :
dsp bself=0x8cc4dd8 signal**=0x8cdb288 dsp bself=0x8cc4130 signal**=0x8cdb288 dsp bself=0x8cd4868 signal**=0x8cda8a0
and as you see, two signal** are identical.
why ? I don't get it.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Hi all --
both the array of t_signal pointers and the t_signals themselves are temporarily constructed to last just for the duration of the dsp() call and then the space is re-used.
The only thing you see from dsp() that will still be there afterward is the array of t_samples pointed to in the t_signal structures.
This ought to be documented somewhere :)
cheers Miller On Sat, Jul 31, 2010 at 03:25:38PM -0400, Mathieu Bouchard wrote:
why is it even possible that in three calls to the 'dsp' method in three different objects, two of them receive the same t_signal pointer pointer ?
static void dsp (BFObject *bself, t_signal **sp) { post("dsp bself=%p signal**=%p",bself,sp); }
gives me :
dsp bself=0x8cc4dd8 signal**=0x8cdb288 dsp bself=0x8cc4130 signal**=0x8cdb288 dsp bself=0x8cd4868 signal**=0x8cda8a0
and as you see, two signal** are identical.
why ? I don't get it.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montr?al, Qu?bec. t?l?phone: +1.514.383.3801
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sat, 31 Jul 2010, Miller Puckette wrote:
both the array of t_signal pointers and the t_signals themselves are temporarily constructed to last just for the duration of the dsp() call and then the space is re-used.
right. I found that out immediately after, when trying to pass that data around. I had to construct an array of t_sample* elements in order to support variable number of signal outlets. (Well, I didn't have to, but I just noticed the existence of dsp_addv, made to be used in exactly that case).
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801