#if false 
#ifdef PRECALC_LOOPS 
static resample_t *rs_vib_bidir(Voice *vp, int32 count){#if SAMPLE_LENGTH_BITS == 32  int32#else  splen_t#endif    ofs = vp->sample_offset,    le = vp->sample->loop_end,    ls = vp->sample->loop_start;  resample_t *dest = resample_buffer + resample_buffer_offset;  sample_t *src = vp->sample->data;  int cc=vp->vibrato_control_counter;  int32 incr = vp->sample_increment;  resample_rec_t resrc;#if false //def PRECALC_LOOPS#if SAMPLE_LENGTH_BITS == 32  int32#else  splen_t#endif    le2 = le << 1,    ls2 = ls << 1;  int32 i, j;  int vibflag = 0;  resrc.loop_start = ls;  resrc.loop_end = le;  resrc.data_length = vp->sample->data_length;  /* Play normally until inside the loop region */  while (count && incr > 0 && ofs < ls)    {      i = PRECALC_LOOP_COUNT(ofs, ls, incr);      if (i > count) i = count;      if (i > cc)	{	  i = cc;	  vibflag = 1;	}      else cc -= i;      count -= i;      if (vibflag)	{	  cc = vp->vibrato_control_ratio;	  incr = update_vibrato(vp, 0);	  vibflag = 0;	}      for(j = 0; j < i; j++)	{	  RESAMPLATION;	  ofs += incr;	}    }  /* Then do the bidirectional looping */  while (count)    {      /* Precalc how many times we should go through the loop */      i = PRECALC_LOOP_COUNT(ofs, incr > 0 ? le : ls, incr);      if(i > count) i = count;      if(i > cc)	{	  i = cc;	  vibflag = 1;	}      else cc -= i;      count -= i;      if (vibflag)	{	  cc = vp->vibrato_control_ratio;	  incr = update_vibrato(vp, (incr < 0));	  vibflag = 0;	}      while (i--)	{	  RESAMPLATION;	  ofs += incr;	}      if (ofs >= 0 && ofs >= le)	{	  /* fold the overshoot back in */	  ofs = le2 - ofs;	  incr *= -1;	}      else if (ofs <= 0 || ofs <= ls)	{	  ofs = ls2 - ofs;	  incr *= -1;	}    }#else /* PRECALC_LOOPS */  resrc.loop_start = ls;  resrc.loop_end = le;  resrc.data_length = vp->sample->data_length;  /* 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 */  /* Update changed values */  vp->vibrato_control_counter = cc;  vp->sample_increment = incr;  vp->sample_offset = ofs;  return resample_buffer + resample_buffer_offset;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/6388505f98330f8e5b2afea539e8386edadb7335/resample.c/buggy/timidity/resample.c