rem: fxsend.d.level = 0xc0 / 2;
add: fxsend.d.level = maxlevel / 2;
context: emuxki_voice_fxupdate(emuxki_voice *voice){	emuxki_chanparms_fxsend fxsend;	if (voice->use & EMU_USE_PLAY) {		fxsend.a.dest = 0x3f;		fxsend.b.dest = 0x3f;		fxsend.c.dest = 0x3f;		fxsend.d.dest = 0x3f;		/* for audigy */		fxsend.e.dest = 0x3f;		fxsend.f.dest = 0x3f;		fxsend.g.dest = 0x3f;		fxsend.h.dest = 0x3f;				fxsend.a.level = fxsend.b.level = fxsend.c.level = fxsend.d.level = 		fxsend.e.level = fxsend.g.level = fxsend.f.level = fxsend.h.level = 0x00;								if (voice->stereo) {			switch(voice->stream->card->play_mode) {				case 2:					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;					} else if((voice->stream->nstereo == 2) || 						((voice->stream->nstereo == 3)&&(voice->voicenum < 2))) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;						if(voice->voicenum > 1 - 1)							fxsend.a.dest-=2;					} else if(voice->stream->nstereo == 3 && voice->voicenum > 1) {							fxsend.a.dest = 0x0;							fxsend.a.level = 0xc0 / 2;							fxsend.b.dest = 0x1;							fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 2 badly managed\n"));					}					break;				case 4:					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum * 2 + 2;						fxsend.b.level = 0xc0;					} else if((voice->stream->nstereo == 2) || 						((voice->stream->nstereo == 3)&&(voice->voicenum < 2))) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;					} else if(voice->stream->nstereo == 3 && voice->voicenum > 1) {						fxsend.a.dest = 0x0;						fxsend.a.level = 0xc0 / 2;						fxsend.b.dest = 0x1;						fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 4 badly managed\n"));					}					break;				case 6: // only on audigy					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum * 2 + 2;						fxsend.b.level = 0xc0;						fxsend.c.dest = 0x4;						fxsend.c.level = 0xc0 / 2;						fxsend.d.dest = 0x5;						fxsend.d.level = 0xc0 / 2;					} else if(voice->stream->nstereo == 2) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;						if(voice->voicenum < 1) {							fxsend.b.dest = 0x4;							fxsend.b.level = 0xc0 / 2;							fxsend.c.dest = 0x5;							fxsend.c.level = 0xc0 / 2;						}					} else if(voice->stream->nstereo == 3) {						fxsend.a.dest = voice->voicenum * 2;						fxsend.a.level = 0xc0;					} else {						LOG(("emuxki_voice_set_stereo case 6 badly managed\n"));					}					break;			}					emuxki_channel_set_fxsend(voice->dataloc.chan[0],						   &fxsend);						switch(voice->stream->card->play_mode) {				case 2:					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;					} else if((voice->stream->nstereo == 2) || 						((voice->stream->nstereo == 3)&&(voice->voicenum < 2))) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;						if(voice->voicenum > 1 - 1)							fxsend.a.dest-=2;					} else if(voice->stream->nstereo == 3 && voice->voicenum > 1) {							fxsend.a.dest = 0x0;							fxsend.a.level = 0xc0 / 2;							fxsend.b.dest = 0x1;							fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 2 badly managed\n"));					}					break;				case 4:					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum * 2 + 3;						fxsend.b.level = 0xc0;					} else if((voice->stream->nstereo == 2) || 						((voice->stream->nstereo == 3)&&(voice->voicenum < 2))) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;					} else if(voice->stream->nstereo == 3 && voice->voicenum > 1) {						fxsend.a.dest = 0x0;						fxsend.a.level = 0xc0 / 2;						fxsend.b.dest = 0x1;						fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 4 badly managed\n"));					}					break;				case 6: // only on audigy					if(voice->stream->nstereo == 1) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum * 2 + 3;						fxsend.b.level = 0xc0;						fxsend.c.dest = 0x4;						fxsend.c.level = 0xc0 / 2;						fxsend.d.dest = 0x5;						fxsend.d.level = 0xc0 / 2;					} else if(voice->stream->nstereo == 2) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;						if(voice->voicenum < 1) {							fxsend.b.dest = 0x4;							fxsend.b.level = 0xc0 / 2;							fxsend.c.dest = 0x5;							fxsend.c.level = 0xc0 / 2;						}					} else if(voice->stream->nstereo == 3) {						fxsend.a.dest = voice->voicenum * 2 + 1;						fxsend.a.level = 0xc0;					} else {						LOG(("emuxki_voice_set_stereo case 6 badly managed\n"));					}					break;			}						   			emuxki_channel_set_fxsend(voice->dataloc.chan[1],						   &fxsend);		} else {			switch(voice->stream->card->play_mode) {				case 2:					if(voice->stream->nmono == 1) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum + 1;						fxsend.b.level = 0xc0;					} else if(voice->stream->nmono == 2) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;					} else if((voice->stream->nmono == 4) || 						((voice->stream->nmono == 6)&&(voice->voicenum < 4))) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						if(voice->voicenum > 2 - 1)							fxsend.a.dest-=2;					} else if(voice->stream->nmono == 6 && voice->voicenum > 3) {							fxsend.a.dest = 0x0;							fxsend.a.level = 0xc0 / 2;							fxsend.b.dest = 0x1;							fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 2 badly managed\n"));					}					break;				case 4:					if(voice->stream->nmono == 1) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum + 1;						fxsend.b.level = 0xc0;						fxsend.c.dest = voice->voicenum + 2;						fxsend.c.level = 0xc0;						fxsend.d.dest = voice->voicenum + 3;						fxsend.d.level = 0xc0;					} else if(voice->stream->nmono == 2) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum + 2;						fxsend.b.level = 0xc0;					} else if((voice->stream->nmono == 4) || 						((voice->stream->nmono == 6)&&(voice->voicenum < 4))) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;					} else if(voice->stream->nmono == 6 && voice->voicenum > 3) {							fxsend.a.dest = 0x0;							fxsend.a.level = 0xc0 / 2;							fxsend.b.dest = 0x1;							fxsend.b.level = 0xc0 / 2;					} else {						LOG(("emuxki_voice_set_stereo case 4 badly managed\n"));					}					break;				case 6: // only on audigy					if(voice->stream->nmono == 1) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum + 1;						fxsend.b.level = 0xc0;						fxsend.c.dest = voice->voicenum + 2;						fxsend.c.level = 0xc0;						fxsend.d.dest = voice->voicenum + 3;						fxsend.d.level = 0xc0;						fxsend.e.dest = voice->voicenum + 4;						fxsend.e.level = 0xc0;						fxsend.f.dest = voice->voicenum + 5;						fxsend.f.level = 0xc0;					} else if(voice->stream->nmono == 2) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						fxsend.b.dest = voice->voicenum + 2;						fxsend.b.level = 0xc0;						fxsend.c.dest = 0x4;						fxsend.c.level = 0xc0 / 2;						fxsend.d.dest = 0x5;						fxsend.d.level = 0xc0 / 2;					} else if(voice->stream->nmono == 4) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;						if(voice->voicenum < 2) {							fxsend.b.dest = 0x4;							fxsend.b.level = 0xc0 / 2;							fxsend.c.dest = 0x5;							fxsend.c.level = 0xc0 / 2;						}					} else if(voice->stream->nmono == 6) {						fxsend.a.dest = voice->voicenum;						fxsend.a.level = 0xc0;					} else {						LOG(("emuxki_voice_set_stereo case 6 badly managed\n"));					}					break;			}						emuxki_channel_set_fxsend(voice->dataloc.chan[0],						   &fxsend);		}	}}