Пример #1
0
/* ------------------------------------------------------------------------- */
void MSALARMAPI ReceivePolling ( long date, short r, long a, long b, long c)
{
	long n;

	n= MidiCountEvs (r);
	if (n) {
		DisplayTask(r);
		MidiTask (ReceivePolling, date+100, r, a, 0, 0);
	}
	else MidiSetRcvAlarm (r, ReceiveEvents);
}
Пример #2
0
/*____________________________________________________________________*/
static MidiEvPtr GetReceived(void)
{
	long n;
	
	if( (n= MidiCountEvs( refNum)) > 1) {
		print ("\nwarning: %ld evts recus\n", n);
		MidiFlushEvs( refNum);
		return 0;
	}
	return MidiGetEv( refNum);
}
Пример #3
0
/* ------------------------------------------------------------------------- */
void DisplayTask (short ref)
{
	long n;

	n= MidiCountEvs(ref);
	while (n > 16) {
		MidiFreeEv (MidiGetEv (ref));
		n--;
	}
	while (n--) {
		Display (MidiGetEv (ref));
	}
}