[PD] convolution code error

Yves Degoyon ydegoyon at free.fr
Wed Aug 21 02:56:41 CEST 2002


hi,

i think the error is to harcode the size of arrays to 255.

in fact, arrays in1 and in2 are of the size of the n variable
passed to the perform routine and this variable is 64 by default
( the default block size ).


for(set=0; set<n; set++)


cheers,

sevy/yves

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.
>
>                                              scott
>






More information about the Pd-list mailing list