a = ((double)sp->sample_rate * freq_table[note]) / 
a = ((double)sp->sample_rate * get_note_freq(sp, note)) / 
static double sample_resamp_info(Sample *sp, int note,				 splen_t *loop_start, splen_t *loop_end,				 splen_t *data_length){    splen_t xls, xle, ls, le, ll, newlen;    double a, xxls, xxle, xn;    a = ((double)sp->sample_rate * freq_table[note]) /	((double)sp->root_freq * play_mode->rate);    a = TIM_FSCALENEG((double)(int32)TIM_FSCALE(a, FRACTION_BITS),		      FRACTION_BITS);    xn = sp->data_length / a;    if(xn >= SPLEN_T_MAX)    {	/* Ignore this sample */	*data_length = 0;	return 0.0;    }    newlen = (splen_t)(TIM_FSCALENEG(xn, FRACTION_BITS) + 0.5);    ls = sp->loop_start;    le = sp->loop_end;    ll = (le - ls);    xxls = ls / a + 0.5;    if(xxls >= SPLEN_T_MAX)    {	/* Ignore this sample */	*data_length = 0;	return 0.0;    }    xls = (splen_t)xxls;    xxle = le / a + 0.5;    if(xxle >= SPLEN_T_MAX)    {	/* Ignore this sample */	*data_length = 0;	return 0.0;    }    xle = (splen_t)xxle;    if((sp->modes & MODES_LOOPING) &&       ((xle - xls) >> FRACTION_BITS) < MIN_LOOPLEN)    {	splen_t n;	splen_t newxle;	double xl; /* Resampled new loop length */	double xnewxle;	xl = ll / a;	if(xl >= SPLEN_T_MAX)	{	    /* Ignore this sample */	    *data_length = 0;	    return 0.0;	}	n = (splen_t)(0.0001 + MIN_LOOPLEN /		    TIM_FSCALENEG(xl, FRACTION_BITS)) + 1;	xnewxle = le / a + n * xl + 0.5;	if(xnewxle >= SPLEN_T_MAX)	{	    /* Ignore this sample */	    *data_length = 0;	    return 0.0;	}	newxle = (splen_t)xnewxle;	newlen += (newxle - xle)>>FRACTION_BITS;	xle = newxle;    }    if(loop_start)	*loop_start = (splen_t)(xls & ~FRACTION_MASK);    if(loop_end)	*loop_end = (splen_t)(xle & ~FRACTION_MASK);    *data_length = newlen << FRACTION_BITS;    return a;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/c280117e182e53ac14c4642e2a213d16de9f2dec/recache.c/buggy/timidity/recache.c