newsp->root_freq = freq_table[p->note]; 
newsp->root_freq = get_note_freq(newsp, p->note); 
static int cache_resampling(struct cache_hash *p){    Sample *sp, *newsp;    sample_t *src, *dest;    splen_t newlen, ofs, le, ls, ll, xls, xle;    int32 i, incr;    resample_rec_t resrc;    double a;    sp = p->sp;    a = sample_resamp_info(sp, p->note, &xls, &xle, &newlen);    if(newlen == 0)	return CACHE_RESAMPLING_NOTOK;    newlen >>= FRACTION_BITS;    if(cache_data_len + newlen + 1 > CACHE_DATA_LEN)	return CACHE_RESAMPLING_NOTOK;    resrc.loop_start = ls = sp->loop_start;    resrc.loop_end = le = sp->loop_end;    resrc.data_length = sp->data_length;    ll = (sp->loop_end - sp->loop_start);    dest = cache_data + cache_data_len;    src = sp->data;    newsp = (Sample *)new_segment(&hash_entry_pool, sizeof(Sample));    memcpy(newsp, sp, sizeof(Sample));    newsp->data = dest;    ofs = 0;    incr = (splen_t)(TIM_FSCALE(a, FRACTION_BITS) + 0.5);    if(sp->modes & MODES_LOOPING)    {	for(i = 0; i < newlen; i++)	{	    if(ofs >= le)		ofs -= ll;	    RESAMPLATION_CACHE;	    ofs += incr;	}    }    else    {	for(i = 0; i < newlen; i++)	{	    RESAMPLATION_CACHE;	    ofs += incr;	}    }    newsp->loop_start = xls;    newsp->loop_end = xle;    newsp->data_length = (newlen << FRACTION_BITS);    if(sp->modes & MODES_LOOPING)	loop_connect(dest, (int32)(xls >> FRACTION_BITS), (int32)(xle >> FRACTION_BITS));    dest[xle >> FRACTION_BITS] = dest[xls >> FRACTION_BITS];    newsp->root_freq = freq_table[p->note];    newsp->sample_rate = play_mode->rate;    p->resampled = newsp;    cache_data_len += newlen + 1;    return CACHE_RESAMPLING_OK;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/c280117e182e53ac14c4642e2a213d16de9f2dec/recache.c/clean/timidity/recache.c