for (i = 0; i < cc; i++) { s = *sp++; MIXATION(left); MIXATION(right); } 
if(vp->pan_delay_rpt == 0) { for (i = 0; i < cc; i++) { s = *sp++; MIXATION(left); MIXATION(right); } } else if(vp->panning < 64) { for (i = 0; i < cc; i++) { s = *sp++; MIXATION(left); DELAYED_MIXATION(right); } } else { for (i = 0; i < cc; i++) { s = *sp++; DELAYED_MIXATION(left); MIXATION(right); } }  
static inline void mix_mystery_signal(		mix_t *sp, int32 *lp, int v, int count){	Voice *vp = voice + v;	final_volume_t left = vp->left_mix, right = vp->right_mix;	int cc, i;	mix_t s;#ifdef SMOOTH_MIXING	int32 linear_left, linear_right;#endif#ifdef ENABLE_PAN_DELAY	int32 pan_delay_wpt = vp->pan_delay_wpt, *pan_delay_buf = vp->pan_delay_buf;#endif	if (! (cc = vp->control_counter)) {		cc = control_ratio;		if (update_signal(v))			/* Envelope ran out */			return;		left = vp->left_mix;		right = vp->right_mix;	}#ifdef SMOOTH_MIXING	compute_mix_smoothing(vp);#endif	while (count)		if (cc < count) {			count -= cc;#ifdef SMOOTH_MIXING			linear_left = FROM_FINAL_VOLUME(left);			if (vp->left_mix_offset) {				linear_left += vp->left_mix_offset;				if (linear_left > MAX_AMP_VALUE) {					linear_left = MAX_AMP_VALUE;					vp->left_mix_offset = 0;				}				left = FINAL_VOLUME(linear_left);			}			linear_right = FROM_FINAL_VOLUME(right);			if (vp->right_mix_offset) {				linear_right += vp->right_mix_offset;				if (linear_right > MAX_AMP_VALUE) {					linear_right = MAX_AMP_VALUE;					vp->right_mix_offset = 0;				}				right = FINAL_VOLUME(linear_right);			}			for (i = 0; (vp->left_mix_offset | vp->right_mix_offset)					&& i < cc; i++) {				s = *sp++;				MIXATION(left);				MIXATION(right);				if (vp->left_mix_offset) {					vp->left_mix_offset += vp->left_mix_inc;					linear_left += vp->left_mix_inc;					if (linear_left > MAX_AMP_VALUE) {						linear_left = MAX_AMP_VALUE;						vp->left_mix_offset = 0;					}					left = FINAL_VOLUME(linear_left);				}				if (vp->right_mix_offset) {					vp->right_mix_offset += vp->right_mix_inc;					linear_right += vp->right_mix_inc;					if (linear_right > MAX_AMP_VALUE) {						linear_right = MAX_AMP_VALUE;						vp->right_mix_offset = 0;					}					right = FINAL_VOLUME(linear_right);				}			}			vp->old_left_mix = linear_left;			vp->old_right_mix = linear_right;			cc -= i;#endif			for (i = 0; i < cc; i++) {				s = *sp++;				MIXATION(left);				MIXATION(right);			}			cc = control_ratio;			if (update_signal(v))				/* Envelope ran out */				return;			left = vp->left_mix;			right = vp->right_mix;#ifdef SMOOTH_MIXING			compute_mix_smoothing(vp);#endif		} else {			vp->control_counter = cc - count;#ifdef SMOOTH_MIXING			linear_left = FROM_FINAL_VOLUME(left);			if (vp->left_mix_offset) {				linear_left += vp->left_mix_offset;				if (linear_left > MAX_AMP_VALUE) {					linear_left = MAX_AMP_VALUE;					vp->left_mix_offset = 0;				}				left = FINAL_VOLUME(linear_left);			}			linear_right = FROM_FINAL_VOLUME(right);			if (vp->right_mix_offset) {				linear_right += vp->right_mix_offset;				if (linear_right > MAX_AMP_VALUE) {					linear_right = MAX_AMP_VALUE;					vp->right_mix_offset = 0;				}				right = FINAL_VOLUME(linear_right);			}			for (i = 0; (vp->left_mix_offset | vp->right_mix_offset)					&& i < count; i++) {				s = *sp++;				MIXATION(left);				MIXATION(right);				if (vp->left_mix_offset) {					vp->left_mix_offset += vp->left_mix_inc;					linear_left += vp->left_mix_inc;					if (linear_left > MAX_AMP_VALUE) {						linear_left = MAX_AMP_VALUE;						vp->left_mix_offset = 0;					}					left = FINAL_VOLUME(linear_left);				}				if (vp->right_mix_offset) {					vp->right_mix_offset += vp->right_mix_inc;					linear_right += vp->right_mix_inc;					if (linear_right > MAX_AMP_VALUE) {						linear_right = MAX_AMP_VALUE;						vp->right_mix_offset = 0;					}					right = FINAL_VOLUME(linear_right);				}			}			vp->old_left_mix = linear_left;			vp->old_right_mix = linear_right;			count -= i;#endif#ifdef ENABLE_PAN_DELAY			if(vp->pan_delay_rpt == 0) {				for (i = 0; i < count; i++) {					s = *sp++;					MIXATION(left);					MIXATION(right);				}			} else if(vp->panning < 64) {				for (i = 0; i < count; i++) {					s = *sp++;					MIXATION(left);					DELAYED_MIXATION(right);				}			} else {				for (i = 0; i < count; i++) {					s = *sp++;					DELAYED_MIXATION(left);					MIXATION(right);				}			}			vp->pan_delay_wpt = pan_delay_wpt;#else			for (i = 0; i < count; i++) {				s = *sp++;				MIXATION(left);				MIXATION(right);			}#endif	/* ENABLE_PAN_DELAY */			return;		}}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/24b0a496639c347eab2c814d6dfa8a4765ff40d1/mix.c/buggy/timidity/mix.c