[PD] convolution code error

Kjetil S. Matheussen k.s.matheussen at notam02.no
Wed Aug 21 18:34:42 CEST 2002

On Tue, 20 Aug 2002, J. Scott Hildebrand wrote:

>      here is the code for my convolution project that i'm working on. i
> sent an earlier email to the pdlist, but i don't think it'll go through
> because it's over 2MB which includes a bin file. anyway i found out where
> i'm getting the seg fault:
>      for(set=0; set<=255; set++)
>      {
> 	     aleftout[set]=(*in1++);  /*brings in 256 samples from input*/
> 	     arightout[set]=(*in2++);
>      }
>     what i think is happening is that aleftout and arightout are float
> arrays, and what i'm trying to pass into them are pointers to floats.
> everything in my code is happening in the while(n--) part of it, so i
> think i just need to make some type conversions there. i believe all of
> the fftr4_ functions take floats, so i need to convert from pointer to
> float, and then again from float to pointer. thanks in advance to anybody
> who can help me! i'm just not sure how to do this.

I'm new to this list, and pd, but i know a bit c. Sorry if this is totally
unreleated, but is this going to help you?

      for(set=0; set<=255; set++)
 	     aleftout[set]=*(in1++);  /*brings in 256 samples from input*/

Seems more logical...


More information about the Pd-list mailing list