/* We need to get the envelope out of Sustain stage. */ /* Note that voice[i].envelope_stage < 3 */ voice[i].status=VOICE_OFF; voice[i].envelope_stage=3; recompute_envelope(i); voice[i].modenv_stage=3; recompute_modulation_envelope(i); apply_modulation_envelope(i); apply_envelope_to_amp(i); ctl_note_event(i); 
/* We need to get the envelope out of Sustain stage. */ /* Note that voice[i].envelope_stage < EG_GUS_RELEASE1 */ voice[i].status = VOICE_OFF; voice[i].envelope_stage = EG_GUS_RELEASE1; recompute_envelope(i); voice[i].modenv_stage = EG_GUS_RELEASE1; recompute_modulation_envelope(i); apply_modulation_envelope(i); apply_envelope_to_amp(i); ctl_note_event(i); 
static void finish_note(int i){    if (voice[i].sample->modes & MODES_ENVELOPE)    {	/* We need to get the envelope out of Sustain stage. */	/* Note that voice[i].envelope_stage < 3 */	voice[i].status=VOICE_OFF;	voice[i].envelope_stage=3;	recompute_envelope(i);	voice[i].modenv_stage=3;	recompute_modulation_envelope(i);	apply_modulation_envelope(i);	apply_envelope_to_amp(i);	ctl_note_event(i);	}    else    {	if(current_file_info->pcm_mode != PCM_MODE_NON)	{	    free_voice(i);	    ctl_note_event(i);	}	else	{	    /* Set status to OFF so resample_voice() will let this voice out		of its loop, if any. In any case, this voice dies when it		    hits the end of its data (ofs>=data_length). */	    if(voice[i].status != VOICE_OFF)	    {		voice[i].status = VOICE_OFF;		ctl_note_event(i);	    }	}    }}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/2ea8509b62c84d99c04bdaf3e19372e2fc368d62/playmidi.c/clean/timidity/playmidi.c