/* terminate note - if free flag is true, free the terminated voice  */
static void terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
/* terminate note - if free flag is true, free the terminated voice  */
static void terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
{
	int  i;
	struct snd_emux_voice *vp;
	unsigned long flags;
	spin_lock_irqsave(&emu->voice_lock, flags);
	for (i = 0; i < emu->max_voices; i++) {
		vp = &emu->voices[i];
		if (STATE_IS_PLAYING(vp->state) && vp->chan == chan &&
		    vp->key == note)
			terminate_voice(emu, vp, free);
	}
	spin_unlock_irqrestore(&emu->voice_lock, flags);
}