/* #ifdef SF_EMULATE_SBLIVE */ 
#ifdef SF_EMULATE_SBLIVE 
static void set_rootkey(SFInfo *sf, SampleList *vp, LayerTable *tbl){    SFSampleInfo *sp = &sf->sample[tbl->val[SF_sampleId]];	int val;    /* scale tuning *//* #ifdef SF_EMULATE_SBLIVE */	vp->v.scale_tuning = 100;/* #else	vp->v.scale_tuning = tbl->val[SF_scaleTuning];#endif */    /* set initial root key & fine tune */    if(sf->version == 1 && tbl->set[SF_samplePitch])    {	/* set from sample pitch */	vp->root = tbl->val[SF_samplePitch] / 100;	vp->tune = -tbl->val[SF_samplePitch] % 100;	if(vp->tune <= -50)	{	    vp->root++;	    vp->tune = 100 + vp->tune;	}	if(vp->v.scale_tuning == 50)	    vp->tune /= 2;    }    else    {	/* from sample info */	vp->root = sp->originalPitch;	vp->tune = sp->pitchCorrection;	if (vp->tune >= 0x80)		vp->tune -= 0x100; /* correct sign */    }    /* orverride root key */    if(tbl->set[SF_rootKey])	vp->root += tbl->val[SF_rootKey] - sp->originalPitch;    vp->tune += tbl->val[SF_coarseTune] * 100 +	(int)tbl->val[SF_fineTune];    /* correct too high pitch */    if(vp->root >= vp->high + 60)      vp->root -= 60;#ifndef CFG_FOR_SF    /* correct tune with the sustain level of modulation envelope */	if(!opt_modulation_envelope) {	    vp->tune += ((int)tbl->val[SF_env1ToPitch] * (1000 - (int)tbl->val[SF_sustainEnv1])) / 1000;	}#endif	vp->v.tremolo_to_pitch = vp->v.tremolo_to_fc = 	vp->v.modenv_to_pitch = vp->v.modenv_to_fc = 0;	if(tbl->set[SF_lfo1ToPitch])		vp->v.tremolo_to_pitch = (int)tbl->val[SF_lfo1ToPitch];	if(tbl->set[SF_lfo1ToFilterFc])		vp->v.tremolo_to_fc = (int)tbl->val[SF_lfo1ToFilterFc];	if(tbl->set[SF_env1ToPitch])		vp->v.modenv_to_pitch = (int)tbl->val[SF_env1ToPitch];	if(tbl->set[SF_env1ToFilterFc])		vp->v.modenv_to_fc = (int)tbl->val[SF_env1ToFilterFc];}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/4261c01441a8cd730021f4fc6be0fc16b375cd42/sndfont.c/buggy/timidity/sndfont.c