[PD] Help with perform routine

Sylvain Le Beux slebeux at limsi.fr
Wed May 3 13:21:32 CEST 2006

Hi all,

I have some questions concerning the structure of the perform routine.
What I would like to know is if all inputs and outputs have to be 
declared(signal and non signal). Cause the last declare variable is "int 
n" retrieving the number of samples in. So, what happens if not all 
inputs are declared.
Here's an example :
Is this :

/t_int *tilde_perform(t_int *w)
  t_tilde  *x = (t_tilde *)(w[1]);         //data structure
//  t_sample  *in1 = (t_sample *)(w[2]);         //sig inlet/
 / t_sample  *in2 = (t_sample *)(w[3]);         //sig inlet// 
  t_sample  *out = (t_float *)(w[4]);          //outlet
//  int        n   = (int)(w[5]);                //number of samples in

is similar to this :

/t_int *tilde_perform(t_int *w)
  t_tilde  *x = (t_tilde *)(w[1]);         //data structure
//  t_sample  *in1 = (t_sample *)(w[2]);         //sig inlet//
  t_sample  *out = (t_float *)(w[3]);          //outlet
//  int        n   = (int)(w[4]);                //number of samples in

If yes, what happens to the "int n" variable ?
What differs or is the second simply incorrect ? Has non signal inlet 
mandatory to be declared ?
Any explanation appreciated. (And yes I first read Iohannes' externals 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: slebeux.vcf
Type: text/x-vcard
Size: 404 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060503/a36546a2/attachment.vcf>

More information about the Pd-list mailing list