init_lfo(lfo1, 1.0f, LFO_SINE); init_lfo(lfo1d, 1.0f, LFO_SINE); 
init_lfo(lfo1, 1.0f, LFO_SINE, 0); init_lfo(lfo1d, 1.0f, LFO_SINE, 0); 
static void do_ch_plate_reverb(int32 *buf, int32 count, InfoPlateReverb *info){	int32 i;	int32 x, xd, val, outl, outr, temp1, temp2, temp3;	delay *pd = &(info->pd), *od1l = &(info->od1l), *od2l = &(info->od2l),		*od3l = &(info->od3l), *od4l = &(info->od4l), *od5l = &(info->od5l),		*od6l = &(info->od6l), *od1r = &(info->od1r), *od2r = &(info->od2r),		*od3r = &(info->od3r), *od4r = &(info->od4r), *od5r = &(info->od5r),		*od7r = &(info->od7r), *od7l = &(info->od7l), *od6r = &(info->od6r),		*td1 = &(info->td1), *td2 = &(info->td2), *td1d = &(info->td1d), *td2d = &(info->td2d);	allpass *ap1 = &(info->ap1), *ap2 = &(info->ap2), *ap3 = &(info->ap3),		*ap4 = &(info->ap4), *ap6 = &(info->ap6), *ap6d = &(info->ap6d);	mod_allpass *ap5 = &(info->ap5), *ap5d = &(info->ap5d);	lfo *lfo1 = &(info->lfo1), *lfo1d = &(info->lfo1d);	filter_lowpass1 *lpf1 = &(info->lpf1), *lpf2 = &(info->lpf2);	int32 t1 = info->t1, t1d = info->t1d;	int32 decayi = info->decayi, ddif1i = info->ddif1i, ddif2i = info->ddif2i,		idif1i = info->idif1i, idif2i = info->idif2i;	double t;	if(count == MAGIC_INIT_EFFECT_INFO) {		init_lfo(lfo1, 1.0f, LFO_SINE);		init_lfo(lfo1d, 1.0f, LFO_SINE);		t = reverb_time_table[reverb_status_gs.time] / reverb_time_table[64] - 1.0;		t = 1.0 + t / 2;		set_delay(pd, reverb_status_gs.pre_delay_time * play_mode->rate / 1000);		set_delay(td1, get_plate_delay(4453, t)),		set_delay(td1d, get_plate_delay(4217, t));		set_delay(td2, get_plate_delay(3720, t));		set_delay(td2d, get_plate_delay(3163, t));		set_delay(od1l, get_plate_delay(266, t));		set_delay(od2l, get_plate_delay(2974, t));		set_delay(od3l, get_plate_delay(1913, t));		set_delay(od4l, get_plate_delay(1996, t));		set_delay(od5l, get_plate_delay(1990, t));		set_delay(od6l, get_plate_delay(187, t));		set_delay(od7l, get_plate_delay(1066, t));		set_delay(od1r, get_plate_delay(353, t));		set_delay(od2r, get_plate_delay(3627, t));		set_delay(od3r, get_plate_delay(1228, t));		set_delay(od4r, get_plate_delay(2673, t));		set_delay(od5r, get_plate_delay(2111, t));		set_delay(od6r, get_plate_delay(335, t));		set_delay(od7r, get_plate_delay(121, t));		set_allpass(ap1, get_plate_delay(142, t), PLATE_INPUT_DIFFUSION1);		set_allpass(ap2, get_plate_delay(107, t), PLATE_INPUT_DIFFUSION1);		set_allpass(ap3, get_plate_delay(379, t), PLATE_INPUT_DIFFUSION2);		set_allpass(ap4, get_plate_delay(277, t), PLATE_INPUT_DIFFUSION2);		set_allpass(ap6, get_plate_delay(1800, t), PLATE_DECAY_DIFFUSION2);		set_allpass(ap6d, get_plate_delay(2656, t), PLATE_DECAY_DIFFUSION2);		set_mod_allpass(ap5, get_plate_delay(672, t), get_plate_delay(16, t), PLATE_DECAY_DIFFUSION1);		set_mod_allpass(ap5d, get_plate_delay(908, t), get_plate_delay(16, t), PLATE_DECAY_DIFFUSION1);		lpf1->a = PLATE_BANDWIDTH, lpf2->a = 1.0 - PLATE_DAMPING;		init_filter_lowpass1(lpf1);		init_filter_lowpass1(lpf2);		info->t1 = info->t1d = 0;		info->decay = PLATE_DECAY;		info->decayi = TIM_FSCALE(info->decay, 24);		info->ddif1 = PLATE_DECAY_DIFFUSION1;		info->ddif1i = TIM_FSCALE(info->ddif1, 24);		info->ddif2 = PLATE_DECAY_DIFFUSION2;		info->ddif2i = TIM_FSCALE(info->ddif2, 24);		info->idif1 = PLATE_INPUT_DIFFUSION1;		info->idif1i = TIM_FSCALE(info->idif1, 24);		info->idif2 = PLATE_INPUT_DIFFUSION2;		info->idif2i = TIM_FSCALE(info->idif2, 24);		info->wet = PLATE_WET * (double)reverb_status_gs.level / 127.0;		return;	} else if(count == MAGIC_FREE_EFFECT_INFO) {		free_delay(pd);	free_delay(td1); free_delay(td1d); free_delay(td2);		free_delay(td2d); free_delay(od1l); free_delay(od2l); free_delay(od3l);		free_delay(od4l); free_delay(od5l); free_delay(od6l); free_delay(od7l);		free_delay(od1r); free_delay(od2r);	free_delay(od3r); free_delay(od4r);		free_delay(od5r); free_delay(od6r);	free_delay(od7r); free_allpass(ap1);		free_allpass(ap2); free_allpass(ap3); free_allpass(ap4); free_allpass(ap6);		free_allpass(ap6d);	free_mod_allpass(ap5); free_mod_allpass(ap5d);		return;	}	for (i = 0; i < count; i++)	{		outr = outl = 0;		x = (reverb_effect_buffer[i] + reverb_effect_buffer[i + 1]) >> 1;		reverb_effect_buffer[i] = reverb_effect_buffer[i + 1] = 0;		do_delay(x, pd->buf, pd->size, pd->index);		do_filter_lowpass1(x, lpf1->x1l, lpf1->ai, lpf1->iai);		do_allpass(x, ap1->buf, ap1->size, ap1->index, idif1i);		do_allpass(x, ap2->buf, ap2->size, ap2->index, idif1i);		do_allpass(x, ap3->buf, ap3->size, ap3->index, idif2i);		do_allpass(x, ap4->buf, ap4->size, ap4->index, idif2i);		/* tank structure */		xd = x;		x += imuldiv24(t1d, decayi);		val = do_lfo(lfo1);		do_mod_allpass(x, ap5->buf, ap5->size, ap5->rindex, ap5->windex,			ap5->ndelay, ap5->depth, val, ap5->hist, ddif1i);		temp1 = temp2 = temp3 = x;	/* n_out_1 */		do_delay(temp1, od5l->buf, od5l->size, od5l->index);		outl -= temp1;	/* left output 5 */		do_delay(temp2, od1r->buf, od1r->size, od1r->index);		outr += temp2;	/* right output 1 */		do_delay(temp3, od2r->buf, od2r->size, od2r->index);		outr += temp3;	/* right output 2 */		do_delay(x, td1->buf, td1->size, td1->index);		do_filter_lowpass1(x, lpf2->x1l, lpf2->ai, lpf2->iai);		temp1 = temp2 = x;	/* n_out_2 */		do_delay(temp1, od6l->buf, od6l->size, od6l->index);		outl -= temp1;	/* left output 6 */		do_delay(temp2, od3r->buf, od3r->size, od3r->index);		outr -= temp2;	/* right output 3 */		x = imuldiv24(x, decayi);		do_allpass(x, ap6->buf, ap6->size, ap6->index, ddif2i);		temp1 = temp2 = x;	/* n_out_3 */		do_delay(temp1, od7l->buf, od7l->size, od7l->index);		outl -= temp1;	/* left output 7 */		do_delay(temp2, od4r->buf, od4r->size, od4r->index);		outr += temp2;	/* right output 4 */		do_delay(x, td2->buf, td2->size, td2->index);		t1 = x;		xd += imuldiv24(t1, decayi);		val = do_lfo(lfo1d);		do_mod_allpass(x, ap5d->buf, ap5d->size, ap5d->rindex, ap5d->windex,			ap5d->ndelay, ap5d->depth, val, ap5d->hist, ddif1i);		temp1 = temp2 = temp3 = xd;	/* n_out_4 */		do_delay(temp1, od1l->buf, od1l->size, od1l->index);		outl += temp1;	/* left output 1 */		do_delay(temp2, od2l->buf, od2l->size, od2l->index);		outl += temp2;	/* left output 2 */		do_delay(temp3, od6r->buf, od6r->size, od6r->index);		outr -= temp3;	/* right output 6 */		do_delay(xd, td1d->buf, td1d->size, td1d->index);		do_filter_lowpass1(xd, lpf2->x1r, lpf2->ai, lpf2->iai);		temp1 = temp2 = xd;	/* n_out_5 */		do_delay(temp1, od3l->buf, od3l->size, od3l->index);		outl -= temp1;	/* left output 3 */		do_delay(temp2, od6r->buf, od6r->size, od6r->index);		outr -= temp2;	/* right output 6 */		xd = imuldiv24(xd, decayi);		do_allpass(xd, ap6d->buf, ap6d->size, ap6d->index, ddif2i);		temp1 = temp2 = xd;	/* n_out_6 */		do_delay(temp1, od4l->buf, od4l->size, od4l->index);		outl += temp1;	/* left output 4 */		do_delay(temp2, od7r->buf, od7r->size, od7r->index);		outr -= temp2;	/* right output 7 */		do_delay(xd, td2d->buf, td2d->size, td2d->index);		t1d = xd;		buf[i] += outl;		buf[i + 1] += outr;		++i;	}	info->t1 = t1, info->t1d = t1d;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/f2f704a7cf56fbd32fbf774cc38550fe963162c5/reverb.c/buggy/timidity/reverb.c