Gives the address of a reception alarm of an application. The reception alarm informs of the presence of these new events in the reception FIFO. This alarm is always called under interruption. Therefore, it must not make use, either directly or indirectly, the Macintosh Memory Manager. However it can have a free access to all the MidiShare functions (except MidiOpen and MidiClose). It can also use the global variables of the application, because, before the call, MidiShare restores the global context register of the application.
pascal RcvAlarmPtr MidiGetRcvAlarm(short refNum);
refNum
- a 16-bit integer, the reference number of the application.
The result, a RcvAlarmPtr, it is the address of the receive alarm routine or NIL if no such routine where installed.
pascal void MyRcvAlarm (short refNum);
refNum
- a 16-bit integer, it is the reference number of the application.
Temporarily disable the application receive alarm.
RcvAlarmPtr p; /*.....*/ p = MidiGetRcvAlarm( myRefNum ); MidiSetRcvAlarm( NIL ); /* Disable application receive alarm */ /*.....*/ MidiSetRcvAlarm( p ); /* Restaure application receive alarm */