if (ne = parse_sysex_event_multi(aevp->data.ext.ptr + 1, aevp->data.ext.len - 1, evm)) 
if ((ne = parse_sysex_event_multi(aevp->data.ext.ptr + 1, aevp->data.ext.len - 1, evm)) > 0) 
static int do_sequencer(struct seq_context *ctxp){	int n, ne, i;	MidiEvent ev, evm[260];	snd_seq_event_t *aevp;	n = snd_seq_event_input(ctxp->handle, &aevp);	if (n < 0 || aevp == NULL)		return 0;	if (ctxp->active && ctxp->queue >= 0)		update_timestamp_from_event(aevp);	else if (IS_STREAM_TRACE)		cur_time_offset = buffer_time_offset;	else		update_timestamp();	switch(aevp->type) {	case SND_SEQ_EVENT_NOTEON:		ev.channel = NOTE_CHAN(aevp);		ev.a       = aevp->data.note.note;		ev.b       = aevp->data.note.velocity;		if (ev.b == 0)			ev.type = ME_NOTEOFF;		else			ev.type = ME_NOTEON;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_NOTEOFF:		ev.channel = NOTE_CHAN(aevp);		ev.a       = aevp->data.note.note;		ev.b       = aevp->data.note.velocity;		ev.type = ME_NOTEOFF;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_KEYPRESS:		ev.channel = NOTE_CHAN(aevp);		ev.a       = aevp->data.note.note;		ev.b       = aevp->data.note.velocity;		ev.type = ME_KEYPRESSURE;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_PGMCHANGE:		ev.channel = CTRL_CHAN(aevp);		ev.a = aevp->data.control.value;		ev.type = ME_PROGRAM;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_CONTROLLER:		if(convert_midi_control_change(CTRL_CHAN(aevp),					       aevp->data.control.param,					       aevp->data.control.value,					       &ev))			seq_play_event(&ev);		break;	case SND_SEQ_EVENT_CONTROL14:		if (aevp->data.control.param < 0 || aevp->data.control.param >= 32)			break;		if (! convert_midi_control_change(CTRL_CHAN(aevp),						  aevp->data.control.param,						  (aevp->data.control.value >> 7) & 0x7f,						  &ev))			break;		seq_play_event(&ev);		if (! convert_midi_control_change(CTRL_CHAN(aevp),						  aevp->data.control.param + 32,						  aevp->data.control.value & 0x7f,						  &ev))			break;		seq_play_event(&ev);		break;		    	case SND_SEQ_EVENT_PITCHBEND:		ev.type    = ME_PITCHWHEEL;		ev.channel = CTRL_CHAN(aevp);		aevp->data.control.value += 0x2000;		ev.a       = (aevp->data.control.value) & 0x7f;		ev.b       = (aevp->data.control.value>>7) & 0x7f;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_CHANPRESS:		ev.type    = ME_CHANNEL_PRESSURE;		ev.channel = CTRL_CHAN(aevp);		ev.a       = aevp->data.control.value;		seq_play_event(&ev);		break;			case SND_SEQ_EVENT_NONREGPARAM:		/* Break it back into its controler values */		ev.type = ME_NRPN_MSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = (aevp->data.control.param >> 7) & 0x7f;		seq_play_event(&ev);		ev.type = ME_NRPN_LSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = aevp->data.control.param & 0x7f;		seq_play_event(&ev);		ev.type = ME_DATA_ENTRY_MSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = (aevp->data.control.value >> 7) & 0x7f;		seq_play_event(&ev);		ev.type = ME_DATA_ENTRY_LSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = aevp->data.control.value & 0x7f;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_REGPARAM:		/* Break it back into its controler values */		ev.type = ME_RPN_MSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = (aevp->data.control.param >> 7) & 0x7f;		seq_play_event(&ev);		ev.type = ME_RPN_LSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = aevp->data.control.param & 0x7f;		seq_play_event(&ev);		ev.type = ME_DATA_ENTRY_MSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = (aevp->data.control.value >> 7) & 0x7f;		seq_play_event(&ev);		ev.type = ME_DATA_ENTRY_LSB;		ev.channel = CTRL_CHAN(aevp);		ev.a = aevp->data.control.value & 0x7f;		seq_play_event(&ev);		break;	case SND_SEQ_EVENT_SYSEX:		if (parse_sysex_event(aevp->data.ext.ptr + 1,				 aevp->data.ext.len - 1, &ev))			seq_play_event(&ev);		if (ne = parse_sysex_event_multi(aevp->data.ext.ptr + 1,				aevp->data.ext.len - 1, evm))			for (i = 0; i < ne; i++)				seq_play_event(&evm[i]);		break;#if SND_LIB_MAJOR > 0 || SND_LIB_MINOR >= 6#define snd_seq_addr_equal(a,b)	((a)->client == (b)->client && (a)->port == (b)->port)	case SND_SEQ_EVENT_PORT_SUBSCRIBED:		if (snd_seq_addr_equal(&aevp->data.connect.dest, &aevp->dest)) {			if (! ctxp->active) {				if (! start_sequencer(ctxp)) {					snd_seq_free_event(aevp);					return 0;				}			}			ctxp->used++;		}		break;	case SND_SEQ_EVENT_PORT_UNSUBSCRIBED:		if (snd_seq_addr_equal(&aevp->data.connect.dest, &aevp->dest)) {			if (ctxp->active) {				ctxp->used--;				if (ctxp->used <= 0) {					snd_seq_free_event(aevp);					return 1; /* quit now */				}			}		}		break;#else	case SND_SEQ_EVENT_PORT_USED:		if (! ctxp->active) {			if (! start_sequencer(ctxp)) {				snd_seq_free_event(aevp);				return 0;			}		}		ctxp->used++;		break;	case SND_SEQ_EVENT_PORT_UNUSED:		if (ctxp->active) {			ctxp->used--;			if (ctxp->used <= 0) {				snd_seq_free_event(aevp);				return 1; /* quit now */			}		}		break;#endif			default:		/*printf("Unsupported event %d\n", aevp->type);*/		break;	}	snd_seq_free_event(aevp);	return 0;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/64c3a98e5ef08ab323c2ea983ca497f2df9f9db2/alsaseq_c.c/clean/interface/alsaseq_c.c