/* Executes the callback for all voices playing the specified note.  */
static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan, void(*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
/* Executes the callback for all voices playing the specified note.  */
static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan, void(*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
{
	int i;
	unsigned long flags;
	struct opl4_voice *voice;
	spin_lock_irqsave(&opl4->reg_lock, flags);
	for (i = 0; i < OPL4_MAX_VOICES; i++) {
		voice = &opl4->voices[i];
		if (voice->chan == chan && voice->note == note) {
			func(opl4, voice);
		}
	}
	spin_unlock_irqrestore(&opl4->reg_lock, flags);
}