[PD] bad vector size

J. Scott Hildebrand jshildebrand at ucdavis.edu
Wed Aug 28 01:12:26 CEST 2002


       i'll just copy and paste my short code which does convolution. it's
not in realtime but right now i'm trying to just get it to spit out audio.
this is the error i get:

error: dac~: bad vector size
error: dac~: bad vector size
Segmentation fault

       thanks for taking a look and here is my perform function:



t_int *convaudio_tilde_perform(t_int *w)
{
  t_convaudio_tilde *x = (t_convaudio_tilde *)(w[1]);
  t_float  *in1 =    (t_float *)(w[2]);
  t_float  *in2 =    (t_float *)(w[3]);
  t_float  *out1 =    (t_float *)(w[4]);
  t_float  *out2 =    (t_float *)(w[5]);

  int         n =           (int)(w[6]);

  int         i;

  t_int     set=0;
  t_int     azi;
  t_int     ele;
  t_int	    readpos;

   while (n--)    /* fill up a 256 array */
   {
     aleftout[set] = in1[n];
     arightout[set] = in2[n];
     set++;
   }//endwhile

     	   azi = (x->firstfloat - 1);
   	   ele = (x->secondfloat - 1);

     fftr4_256(aleftout);       //does convolution
     fftr4_256(bhrir_l[azi][ele]);
     fftr4_mul256(aleftout,bhrir_l[azi][ele]);
     fftr4_scale256(aleftout);
     fftr4_un256(aleftout);

     fftr4_256(arightout);
     fftr4_256(bhrir_r[azi][ele]);
     fftr4_mul256(arightout,bhrir_r[azi][ele]);
     fftr4_scale256(arightout);
     fftr4_un256(arightout);

   for(readpos=0; readpos<256; readpos++)
   {
	   *(out2++) = aleftout[readpos];
	   *(out1++) = arightout[readpos];
   }

  return (w+7);
} // endperform


--------------------------------------------------------------------

	"640K ought to be enough for anybody." -- Bill Gates, 1981

--------------------------------------------------------------------





More information about the Pd-list mailing list