((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]); 
((double) (sp->sample_rate) * f); 
void pre_resample(Sample * sp){  double a, b, xdiff;  splen_t ofs, newlen;  sample_t *newdata, *dest, *src = (sample_t *)sp->data, *vptr;  int32 v, v1, v2, v3, v4, v5, i, count, incr;  resample_rec_t resrc;  ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * pre-resampling for note %d (%s%d)",	    sp->note_to_use,	    note_name[sp->note_to_use % 12], (sp->note_to_use & 0x7F) / 12);  a = b = ((double) (sp->root_freq) * play_mode->rate) /      ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]);  if((int64)sp->data_length * a >= 0x7fffffffL)  {      /* Too large to compute */      ctl->cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d",		sp->note_to_use);      return;  }  newlen = (splen_t)(sp->data_length * a);  count = (newlen >> FRACTION_BITS);  ofs = incr = (sp->data_length - 1) / (count - 1);  if((double)newlen + incr >= 0x7fffffffL)  {      /* Too large to compute */      ctl->cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d",		sp->note_to_use);      return;  }  dest = newdata = (sample_t *)safe_malloc((int32)(newlen >> (FRACTION_BITS - 1)) + 2);  dest[newlen >> FRACTION_BITS] = 0;  *dest++ = src[0];  resrc.loop_start = 0;  resrc.loop_end = sp->data_length;  resrc.data_length = sp->data_length;  /* Since we're pre-processing and this doesn't have to be done in     real-time, we go ahead and do the higher order interpolation. */  for(i = 1; i < count; i++)  {    *dest++ = cur_resample(src, ofs, &resrc);    ofs += incr;  }  sp->data_length = newlen;  sp->loop_start = (splen_t)(sp->loop_start * b);  sp->loop_end = (splen_t)(sp->loop_end * b);  free(sp->data);  sp->data = (sample_t *) newdata;  sp->root_freq = freq_table[(int) (sp->note_to_use)];  sp->sample_rate = play_mode->rate;  sp->low_freq = freq_table[0];  sp->high_freq = freq_table[127];}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/c280117e182e53ac14c4642e2a213d16de9f2dec/resample.c/clean/timidity/resample.c