Sample *sp, *closest; 
Sample *sp, *spc; 
static int select_play_sample(Sample *splist,		int nsp, int note, int *vlist, MidiEvent *e){	int32 f, fs, cdiff, diff;	int8 tt = channel[e->channel].temper_type;	uint8 tp = channel[e->channel].rpnmap[RPN_ADDR_0003];	Sample *sp, *closest;	int16 st;	double ratio;	int i, j, nv, vel;		if (opt_pure_intonation) {		if (current_keysig < 8)			f = freq_table_pureint[current_freq_table][note];		else			f = freq_table_pureint[current_freq_table + 12][note];	} else		switch (tt) {		case 0:			f = freq_table_tuning[tp][note];			break;		case 1:			f = freq_table_pytha[current_freq_table][note];			break;		case 2:			if (current_temper_keysig < 8)				f = freq_table_meantone[current_freq_table][note];			else				f = freq_table_meantone[current_freq_table + 12][note];			break;		case 3:			if (current_temper_keysig < 8)				f = freq_table_pureint[current_freq_table][note];			else				f = freq_table_pureint[current_freq_table + 12][note];			break;		default:	/* user-defined temperaments */			if ((tt -= 0x40) >= 0 && tt < 4) {				if (current_temper_keysig < 8)					f = freq_table_user[tt][current_freq_table][note];				else					f = freq_table_user[tt][current_freq_table + 12][note];			} else				f = freq_table[note];			break;		}	fs = (tt) ? freq_table[note] : freq_table_tuning[tp][note];	vel = e->b;	nv = 0;	for (i = 0, sp = splist; i < nsp; i++, sp++) {		/* SF2 - Scale Tuning */		if ((st = sp->scale_tuning) != 100) {			ratio = pow(2.0, (note - 60) * (st - 100) / 1200.0);			f *= ratio + 0.5;			fs *= ratio + 0.5;		}		if (sp->low_freq <= fs && sp->high_freq >= fs				&& sp->low_vel <= vel && sp->high_vel >= vel) {			j = vlist[nv] = find_voice(e);			voice[j].orig_frequency = f;			MYCHECK(voice[j].orig_frequency);			voice[j].sample = sp;			voice[j].status = VOICE_ON;			nv++;		}	}	if (nv == 0) {		cdiff = 0x7fffffff;		for (i = 0, sp = splist; i < nsp; i++, sp++) {			diff = abs(sp->root_freq - fs);			if (diff < cdiff) {				closest = sp;				cdiff = diff;			}		}		/* SF2 - Scale Tuning */		if ((st = sp->scale_tuning) != 100) {			ratio = pow(2.0, (note - 60) * (st - 100) / 1200.0);			f *= ratio + 0.5;			fs *= ratio + 0.5;		}		j = vlist[nv] = find_voice(e);		voice[j].orig_frequency = f;		MYCHECK(voice[j].orig_frequency);		voice[j].sample = closest;		voice[j].status = VOICE_ON;		nv++;	}	return nv;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/80dfda671a9b7324bc69e1fca2306844026bc4f3/playmidi.c/clean/timidity/playmidi.c