init_lfo(&(info->lfoL), (double)chorus_status_gs.rate * 0.122f, LFO_SINE, 0); init_lfo(&(info->lfoR), (double)chorus_status_gs.rate * 0.122f, LFO_SINE, 90); 
init_lfo(&(info->lfoL), (double)chorus_status_gs.rate * 0.122f, LFO_TRIANGULAR, 0); init_lfo(&(info->lfoR), (double)chorus_status_gs.rate * 0.122f, LFO_TRIANGULAR, 90); 
static void do_ch_stereo_chorus(int32 *buf, int32 count, InfoStereoChorus *info){	int32 i, output, f0, f1, v0, v1;	int32 *bufL = info->delayL.buf, *bufR = info->delayR.buf,		*lfobufL = info->lfoL.buf, *lfobufR = info->lfoR.buf,		icycle = info->lfoL.icycle, cycle = info->lfoL.cycle,		leveli = info->leveli, feedbacki = info->feedbacki,		send_reverbi = info->send_reverbi, send_delayi = info->send_delayi,		depth = info->depth, pdelay = info->pdelay, rpt0 = info->rpt0;	int32 wpt0 = info->wpt0, spt0 = info->spt0, spt1 = info->spt1,		hist0 = info->hist0, hist1 = info->hist1, lfocnt = info->lfoL.count;	if(count == MAGIC_INIT_EFFECT_INFO) {		init_lfo(&(info->lfoL), (double)chorus_status_gs.rate * 0.122f, LFO_SINE, 0);		init_lfo(&(info->lfoR), (double)chorus_status_gs.rate * 0.122f, LFO_SINE, 90);		info->pdelay = chorus_delay_time_table[chorus_status_gs.delay] * (double)play_mode->rate / 1000.0f;		info->depth = (double)(chorus_status_gs.depth + 1) / 3.2f * (double)play_mode->rate / 1000.0f;		info->pdelay -= info->depth / 2;	/* NOMINAL_DELAY to delay */		if (info->pdelay < 1) {info->pdelay = 1;}		info->rpt0 = info->pdelay + info->depth + 2;	/* allowance */		set_delay(&(info->delayL), info->rpt0);		set_delay(&(info->delayR), info->rpt0);		info->feedback = (double)chorus_status_gs.feedback * 0.763f / 100.0f;		info->level = (double)chorus_status_gs.level / 127.0f * MASTER_CHORUS_LEVEL;		info->send_reverb = (double)chorus_status_gs.send_reverb * 0.787f / 100.0f * REV_INP_LEV;		info->send_delay = (double)chorus_status_gs.send_delay * 0.787f / 100.0f;		info->feedbacki = TIM_FSCALE(info->feedback, 24);		info->leveli = TIM_FSCALE(info->level, 24);		info->send_reverbi = TIM_FSCALE(info->send_reverb, 24);		info->send_delayi = TIM_FSCALE(info->send_delay, 24);		info->wpt0 = info->spt0 = info->spt1 = info->hist0 = info->hist1 = 0;		return;	} else if(count == MAGIC_FREE_EFFECT_INFO) {		free_delay(&(info->delayL));		free_delay(&(info->delayR));		return;	}	/* LFO */	f0 = imuldiv24(lfobufL[imuldiv24(lfocnt, icycle)], depth);	spt0 = wpt0 - pdelay - (f0 >> 8);	/* integral part of delay */	f0 = 0xFF - (f0 & 0xFF);	/* (1 - frac) * 256 */	if(spt0 < 0) {spt0 += rpt0;}	f1 = imuldiv24(lfobufR[imuldiv24(lfocnt, icycle)], depth);	spt1 = wpt0 - pdelay - (f1 >> 8);	/* integral part of delay */	f1 = 0xFF - (f1 & 0xFF);	/* (1 - frac) * 256 */	if(spt1 < 0) {spt1 += rpt0;}		for(i = 0; i < count; i++) {		v0 = bufL[spt0];		v1 = bufR[spt1];		/* LFO */		if(++wpt0 == rpt0) {wpt0 = 0;}		f0 = imuldiv24(lfobufL[imuldiv24(lfocnt, icycle)], depth);		spt0 = wpt0 - pdelay - (f0 >> 8);	/* integral part of delay */		f0 = 0xFF - (f0 & 0xFF);	/* (1 - frac) * 256 */		if(spt0 < 0) {spt0 += rpt0;}		f1 = imuldiv24(lfobufR[imuldiv24(lfocnt, icycle)], depth);		spt1 = wpt0 - pdelay - (f1 >> 8);	/* integral part of delay */		f1 = 0xFF - (f1 & 0xFF);	/* (1 - frac) * 256 */		if(spt1 < 0) {spt1 += rpt0;}		if(++lfocnt == cycle) {lfocnt = 0;}		/* left */		/* delay with all-pass interpolation */		output = hist0 = v0 + imuldiv8(bufL[spt0] - hist0, f0);		bufL[wpt0] = chorus_effect_buffer[i] + imuldiv24(output, feedbacki);		output = imuldiv24(output, leveli);		buf[i] += output;		/* send to other system effects (it's peculiar to GS) */		reverb_effect_buffer[i] += imuldiv24(output, send_reverbi);		delay_effect_buffer[i] += imuldiv24(output, send_delayi);		/* right */		/* delay with all-pass interpolation */		output = hist1 = v1 + imuldiv8(bufR[spt1] - hist1, f1);		bufR[wpt0] = chorus_effect_buffer[++i] + imuldiv24(output, feedbacki);		output = imuldiv24(output, leveli);		buf[i] += output;		/* send to other system effects (it's peculiar to GS) */		reverb_effect_buffer[i] += imuldiv24(output, send_reverbi);		delay_effect_buffer[i] += imuldiv24(output, send_delayi);	}	memset(chorus_effect_buffer, 0, sizeof(int32) * count);	info->wpt0 = wpt0, info->spt0 = spt0, info->spt1 = spt1,		info->hist0 = hist0, info->hist1 = hist1;	info->lfoL.count = info->lfoR.count = lfocnt;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/3ca5a334f32cb6f2e1c419f4aea900b3d0fb33f0/reverb.c/buggy/timidity/reverb.c