*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audio/alCheckEvent (3d)              
Title
Content
Arch
Section
 

Contents


alCheckEvent(3dm)					     alCheckEvent(3dm)


NAME    [Toc]    [Back]

     alCheckEvent - Looks for an event in the event queue and retrieves	it.

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     int alCheckEvent(ALeventQueue eventq,int src,int param,ALevent event)

PARAMETER    [Toc]    [Back]

     eventq   expects an ALeventQueue structure	from which you want to
	      retrieve audio events.

     src      expects an int with the value of the resource that generated or
	      posted the audio event.

     param    expects an int with the value of the parameter for the audio
	      event.

     event    expects an ALevent structure previously initialized by
	      alNewEvent(3dm).

DESCRIPTION    [Toc]    [Back]

     alCheckEvent(3dm) retrieves the next ALevent struct in eventq that
     matches its fields	with param and src and places it on event.  This call
     will not block if the event is not	found, or the event queue is empty.
     Note that src refers to the resource that generated or posted the event,
     please refer to alSelectEvents(3dm) and alParams(3dm) for more
     information.

     To	process	the event, use the following calls: alGetEventParam(3dm),
     alGetEventUST(3dm), alGetEventValue(3dm), alGetEventData(3dm),
     alGetEventResource(3dm),  and alGetEventSrcResource(3dm).

EXAMPLE    [Toc]    [Back]

     The following examples tries to retrieve an event from an event queue
     through alCheckEvent(3dm).	 The event should have an AL_GAIN parameter
     and the its resource should be the	AL_DEFAULT_INPUT.

     int     param;
     ALevent event;
     /*
      *	Initialize an ALevent structure.
      */

     event = alNewEvent();
     if(event == NULL) {
       fprintf(stderr,"Event allocation	failed:	%s",
       alGetErrorString(oserror()));
       exit(-1);
     }




									Page 1






alCheckEvent(3dm)					     alCheckEvent(3dm)



     /*
      *	Check for the event
      */
     param = AL_GAIN;
     resource =	AL_DEFAULT_INPUT;

     status = alCheckEvent(eventq,param,resource,event);
     if(status == -1) {
       fprintf(stderr,"Event was not found: %s",
       alGetErrorString(oserror()));
       exit(-1);
     }

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, alCheckEvent returns 0.

     Otherwise,	alCheckEvent returns -1	and sets an error number which can be
     retrieved with oserror(3C).

     alCheckEvent can fail for the following reason:

     AL_BAD_INVALID_EVENTQ    eventq is	either invalid or null.

     AL_BAD_INVALID_EVENT     event is either invalid or null.

     AL_BAD_EVENT_NOT_FOUND   An event match was not found in eventq.

SEE ALSO    [Toc]    [Back]

      
      
     alOpenEventQueue(3dm), alSelectEvents(2), alGetEventParam(3dm),
     alGetEventUST(3dm), alGetEventValue(3dm), alGetEventData(3dm),
     alGetEventResource(3dm), alGetEventSrcResource(3dm), alParams(3dm),
     oserror(3C)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
alNextEvent IRIX Retrieves front most event from queue
alPendingEvents IRIX Get total number of event queued in event queue
qreset IRIX empties the event queue
qcontrol IRIX administers event queue
alOpenEventQueue IRIX open an audio event queue
alFlushEvents IRIX Flush all events in event queue
qtest IRIX checks the contents of the event queue
alCloseEventQueue IRIX close an audio event queue
qread IRIX reads the first entry in the event queue
qenter IRIX creates an event queue entry
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service