if(tbl->set[SF_env1ToFilterFc] && (int)tbl->val[SF_env1ToFilterFc] > 0) 
if(tbl->set[SF_env1ToFilterFc] && tbl->val[SF_env1ToFilterFc] > 0) 
static void set_init_info(SFInfo *sf, SampleList *vp, LayerTable *tbl){    int val,pan;    SFSampleInfo *sample;    sample = &sf->sample[tbl->val[SF_sampleId]];    /* key range */    if(tbl->set[SF_keyRange])    {	vp->low = LOWNUM(tbl->val[SF_keyRange]);	vp->high = HIGHNUM(tbl->val[SF_keyRange]);    }    else    {	vp->low = 0;	vp->high = 127;    }    vp->v.low_freq = freq_table[(int)vp->low];    vp->v.high_freq = freq_table[(int)vp->high];    /* velocity range */    if(tbl->set[SF_velRange])    {	vp->v.low_vel = LOWNUM(tbl->val[SF_velRange]);	vp->v.high_vel = HIGHNUM(tbl->val[SF_velRange]);    }    /* fixed key & velocity */    if(tbl->set[SF_keynum])	vp->v.note_to_use = tbl->val[SF_keynum];#if 0 /* Not supported */    vp->fixvel = tbl->val[SF_velocity];#endif	/* panning position: 0 to 127 */	val = (int)tbl->val[SF_panEffectsSend];    if(sample->sampletype == 1) {		if(val < -500)		vp->v.panning = 0;		else if(val > 500)		vp->v.panning = 127;		else		vp->v.panning = (int8)((val + 500) * 127 / 1000);		/* vp->fixpan = -1; */	} else if(sample->sampletype == 2) {		if(val < -500) {val = -500;}		else if(val > 500) {val = 500;}		pan = 127 + ((val + 500) * 127 / 1000) - 64;		if(pan > 127) {pan = 127;}		vp->v.panning = pan;	} else if(sample->sampletype == 4) {		if(val < -500) {val = -500;}		else if(val > 500) {val = 500;}		pan = ((val + 500) * 127 / 1000) - 64;		if(pan < 0) {pan = 0;}		vp->v.panning = pan;	}#if 0 /* Not supported */    /* initial volume */    vp->amplitude = awe_option.default_volume * 127 / 100;    /* this is not a centibel? */    vp->attenuation = awe_calc_attenuation((int)(tbl->val[SF_initAtten] / awe_option.atten_sense));	    /* chorus & reverb effects */    if (tbl->set[SF_chorusEffectsSend])	vp->parm.chorus = awe_calc_chorus(tbl->val[SF_chorusEffectsSend]);    else	vp->parm.chorus = awe_option.default_chorus * 255 / 100;    if (tbl->set[SF_reverbEffectsSend])	vp->parm.reverb = awe_calc_reverb(tbl->val[SF_chorusEffectsSend]);    else	vp->parm.reverb = awe_option.default_reverb * 255 / 100;#endif	/*	if(tbl->set[SF_chorusEffectsSend] && tbl->val[SF_chorusEffectsSend]) {		vp->chorus_send = (int8)(tbl->val[SF_chorusEffectsSend] / 8) & 0x7F;	} else {vp->chorus_send = 0;}	if(tbl->set[SF_reverbEffectsSend] && tbl->val[SF_reverbEffectsSend]) {		vp->reverb_send = (int8)(tbl->val[SF_reverbEffectsSend] / 8) & 0x7F;	} else {vp->reverb_send = 0;}*/#ifndef CFG_FOR_SF	if(opt_sf_lpf || opt_lpf_def) {		current_sfrec->def_cutoff_allowed = 1;		current_sfrec->def_resonance_allowed = 1;	}#endif    /* initial cutoff & resonance */    vp->cutoff_freq = 0;    if(tbl->val[SF_initialFilterFc] < 0)	tbl->set[SF_initialFilterFc] = tbl->val[SF_initialFilterFc] = 0;    if(current_sfrec->def_cutoff_allowed &&       (tbl->set[SF_initialFilterFc] || tbl->set[SF_env1ToFilterFc]))    {	if(!tbl->set[SF_initialFilterFc])	    val = 13500;	else	    val = tbl->val[SF_initialFilterFc];	if(tbl->set[SF_env1ToFilterFc] && (int)tbl->val[SF_env1ToFilterFc] > 0)	{	    val += ((int)tbl->val[SF_env1ToFilterFc])/* * (1000 - (int)tbl->val[SF_sustainEnv1])) / 1000*/;	}	vp->cutoff_freq = abscent_to_Hz(val);    }    vp->resonance = 0;    if(current_sfrec->def_resonance_allowed && tbl->set[SF_initialFilterQ])    {	val = tbl->val[SF_initialFilterQ];	vp->resonance_dB = (FLOAT_T)val / 10.0;	vp->resonance = 1.0 / pow(10.0,(FLOAT_T)val / 2.0 / 200.0);	vp->param_resonance = val * 127 / 960;	if(val = 0) {vp->resonance = 0;}	}#if 0 /* Not supported */    /* exclusive class key */    vp->exclusiveClass = tbl->val[SF_keyExclusiveClass];#endif}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/39cea11b7c6417ccf07084809ea6060eab026595/sndfont.c/clean/timidity/sndfont.c