when trying to dynamically create a user-defined amount of audio inputs, i try the following code but it just seg faults.
static void *multi_source_convolution_tilde_new(t_floatarg f, char *argv[]) {
int i;
t_multi_source_convolution_tilde *x =
(t_multi_source_convolution_tilde *)pd_new(multi_source_convolution_tilde_class);
x->f_multi_source_convolution = f;
//additional signal and float inlets
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("first")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("bound"));
for(i = 0; i <= atoi(argv[2]); i++) { inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); }
//two signal outlets for stereo outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal);
return (void *)x; }
"640K ought to be enough for anybody." -- Bill Gates, 1981
Scott,
Well, I may have led you in the wrong direction last time, and this may also just be a wild shot. Try and peak a bit in the source code for multiline~ in the zexy lib. This object creates signal inlets according to the number of arguments. I have not had a closer look but there are a lot of "while (i--)" loops (i being the number of signal inlets). Perhaps Johannes can shed some light on how to proceed.
Cheers Soeren
J. Scott Hildebrand wrote:
when trying to dynamically create a user-defined amount of audio inputs, i try the following code but it just seg faults.
I think this is easy with FLEXT.
At least I have dynamic number of non-signal outlets in my flext external...
Ben
Scott,
Well, I may have led you in the wrong direction last time, and this may also just be a wild shot. Try and peak a bit in the source code for multiline~ in the zexy lib. This object creates signal inlets according to the number of arguments. I have not had a closer look but there are a lot of "while (i--)" loops (i being the number of signal inlets). Perhaps Johannes can shed some light on how to proceed.
Cheers Soeren
J. Scott Hildebrand wrote:
when trying to dynamically create a user-defined amount of audio inputs, i try the following code but it just seg faults.
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list