ACheckMaskEvent(3X) — Series 700 Only
NAME
ACheckMaskEvent − get first event in audio event queue that matches mask
SYNOPSIS
#include <audio/Alib.h>
Boolean
ACheckMaskEvent (
Audio *audio,
AEventMask event_mask,
AEvent *event_return,
long *status_return
);
DESCRIPTION
ACheckMaskEvent() dequeues and returns the first event in the queue that matches the mask and returns TRUE. If no match is found, the function returns FALSE immediately. Unlike AMaskEvent(), it does not block if no match is found.
audio is the Audio structure associated with this connection.
event_mask is the mask specifying what type(s) of event to look for.
event_return is the first event found in the queue.
status_return receives the returned status of the operation, unless it is set to NULL.
RETURN VALUE
Upon successful completion, ACheckMaskEvent() returns TRUE or FALSE.
ERRORS
If status_return is not set to NULL, one of the following is returned in status_return:
0 AENoError
2 AEBadAudio
3 AEBadValue
EXAMPLES
The following example sets the event mask to check for errors and transaction started events, and sets up event_return to receive event data and status_return to receive status data.
Boolean first_match; /* match found*/
Audio *audio; /* audio connection */
AEventMask emask; /* event mask */
AEvent event_return; /* event return*/
long status; /* error status */
.
.
.
/* check event queue for mask match */
emask = (AErrorMask | ATransStartedMask);
first_match = ACheckEventMask(audio, emask, &event_return, &status);
DEPENDENCIES
This function belongs to the Audio Library of functions that manage connections to an audio server. The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to the hardware manual that accompanies your system.
AUTHOR
ACheckMaskEvent() was developed by HP.
SEE ALSO
ACheckEvent(3X), AEventsQueued(3X), AMaskEvent(3X), ANextEvent(3X), APeekEvent(3X), APutBackEvent(3X), AQlength(3X), ASelectInput(3X).
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.03: April 1994