INTERPVARS; 
INTERPVARS 
static sample_t *rs_bidir(Voice *vp, int32 count){  INTERPVARS;  int32     ofs=vp->sample_offset,    incr=vp->sample_increment,    le=vp->sample->loop_end,    ls=vp->sample->loop_start;  sample_t     *dest=resample_buffer,     *src=vp->sample->data;#ifdef PRECALC_LOOPS  int32    le2 = le<<1,     ls2 = ls<<1,    i;  /* Play normally until inside the loop region */  if (ofs <= ls)     {      /* NOTE: Assumes that incr > 0, which is NOT always the case	 when doing bidirectional looping.  I have yet to see a case	 where both ofs <= ls AND incr < 0, however. */      i = (ls - ofs) / incr + 1;      if (i > count) 	{	  i = count;	  count = 0;	}       else count -= i;      while (i--) 	{	  RESAMPLATION;	  ofs += incr;	}    }  /* Then do the bidirectional looping */    while(count)     {      /* Precalc how many times we should go through the loop */      i = ((incr > 0 ? le : ls) - ofs) / incr + 1;      if (i > count) 	{	  i = count;	  count = 0;	}       else count -= i;      while (i--) 	{	  RESAMPLATION;	  ofs += incr;	}      if (ofs>=le) 	{	  /* fold the overshoot back in */	  ofs = le2 - ofs;	  incr *= -1;	}       else if (ofs <= ls) 	{	  ofs = ls2 - ofs;	  incr *= -1;	}    }#else /* PRECALC_LOOPS */  /* Play normally until inside the loop region */  if (ofs < ls)    {      while (count--)	{	  RESAMPLATION;	  ofs += incr;	  if (ofs>=ls)	    break;	}    }  /* Then do the bidirectional looping */  if (count>0)    while (count--)      {	RESAMPLATION;	ofs += incr;	if (ofs>=le)	  {	    /* fold the overshoot back in */	    ofs = le - (ofs - le);	    incr = -incr;	  }	else if (ofs <= ls)	  {	    ofs = ls + (ls - ofs);	    incr = -incr;	  }      }  #endif /* PRECALC_LOOPS */  vp->sample_increment=incr;  vp->sample_offset=ofs; /* Update offset */  return resample_buffer;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/cb293c4705e0c7b93d3269c59bcf9bbcab7f6278/resample.c/buggy/resample.c