INTERPVARS; 
INTERPVARS 
static sample_t *rs_vib_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;  int     cc=vp->vibrato_control_counter;#ifdef PRECALC_LOOPS  int32    le2=le<<1,    ls2=ls<<1,    i;  int    vibflag = 0;  /* Play normally until inside the loop region */  while (count && (ofs <= ls))     {      i = (ls - ofs) / incr + 1;      if (i > count) i = count;      if (i > cc) 	{	  i = cc;	  vibflag = 1;	}       else cc -= i;      count -= i;      while (i--) 	{	  RESAMPLATION;	  ofs += incr;	}      if (vibflag) 	{	  cc = vp->vibrato_control_ratio;	  incr = update_vibrato(vp, 0);	  vibflag = 0;	}    }    /* 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;      if(i > cc) 	{	  i = cc;	  vibflag = 1;	}       else cc -= i;      count -= i;      while (i--) 	{	  RESAMPLATION;	  ofs += incr;	}      if (vibflag) 	{	  cc = vp->vibrato_control_ratio;	  incr = update_vibrato(vp, (incr < 0));	  vibflag = 0;	}      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--)	{	  if (!cc--)	    {	      cc=vp->vibrato_control_ratio;	      incr=update_vibrato(vp, 0);	    }	  RESAMPLATION;	  ofs += incr;	  if (ofs>=ls)	    break;	}    }  /* Then do the bidirectional looping */  if (count>0)    while (count--)      {	if (!cc--)	  {	    cc=vp->vibrato_control_ratio;	    incr=update_vibrato(vp, (incr < 0));	  }	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->vibrato_control_counter=cc;  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