i have an external that i'm working on that is being very
tempermental at the moment. i have the following code right BEFORE
everything else in my ~.c file:
static float bhrir_l[25][50][512];
static float bhrir_r[25][50][512];
static void readfile(void)
{
t_int az, el, i;
FILE *fid;
fid = fopen("hrir.bin", "r");
for(az=0; az<=24; az++)
{
for(el=0; el<=49; el++) /*takes from hrir.bin all hrtfs and arrays
them*/
{
fread(bhrir_l[az][el], sizeof(float), 200, fid);
for(i=200; i<=511; i++){bhrir_l[az][el][i]=0;} /*adds a
bunch of zeroes*/
fread(bhrir_r[az][el], sizeof(float), 200, fid);
for(i=200; i<=511; i++){bhrir_r[az][el][i]=0;}
}
}
}
this code takes a binary file and takes a bunch of data and
arranges it in the two 3-dimensional arrays. when i try to access the
arrays inside of my perform function, all i get is zeros. do i need to
declare the arrays and fill them up somewhere else? i was thinking that i
might need the arrays to be inside Pd's internal data struct, but i'm not
sure. any help is appreciated!
scott
--------------------------------------------------------------------
"640K ought to be enough for anybody." -- Bill Gates, 1981
--------------------------------------------------------------------