[PD] outlet with list of int, symbol segfaulting

David Merrill dmerrill at media.mit.edu
Sun Apr 23 22:29:23 CEST 2006


Hello everyone -
I am writing an external in C that needs to output a list consisting of 
an integer, followed by a string (symbol). In PD, I plan to route this 
list based on the first element. I'm having trouble figuring out the 
correct way to do this though. Can someone tell me what I'm doing wrong 
in the following code?

A related question: If my end goal is to route by the int, and use the 
string separately, would I be better off using sprintf to pack the int 
and string into a single symbol for output?
thanks very much,
-David Merrill
note: I have tried both outlet_list, and outlet_anything, and both cause 
the segfault.

static void output_inputpath(t_input_noticer *x, int idx, char *path)
{
  t_atom t[2];

  SETFLOAT(&(t[0]),idx);
  SETSYMBOL(&(t[1]),gensym(path));

  // THE FOLLOWING LINE SEGFAULTS PD
  outlet_list(x->notify_out, &s_list, 2, t);
}




More information about the Pd-list mailing list