ftp.nice.ch/pub/next/unix/audio/cmix.s.tar.gz#/cmix/lib/old.tablei.c

This is old.tablei.c in view mode; [Download] [Up]

float tablei(nsample,array,tab)

long nsample;
float *array,*tab;

{
	register loc1,loc2;
        float frac = ((float)(nsample)/(*tab)) * *(tab+1);
	if(frac >= *(tab+1))  {
		loc1 = *(tab+1);
		loc2 = loc1;
		frac = 0;
		}
	else    {
		loc1 = frac;
		loc2 = loc1+1;
		frac = frac - (float)loc1;
		}
	return(*(array+loc1) + frac * (*(array+loc2) - *(array+loc1)));
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.