alGetEventValue(3dm)alGetEventValue(3dm)NAMEalGetEventValue - get ALvalue of audio event
SYNOPSIS
#include <dmedia/audio.h>
ALvalue alGetEventValue(ALevent event)
PARAMETER
event expects an ALevent structure initialized by alNextEvent(3dm) or
alCheckEvent(3dm).
DESCRIPTIONalGetEventValue returns the event data information as an ALvalue union
from the ALevent structure.
As with alGetParams(3dm), the ALvalue type will depend on the parameter.
For a complete list of event parameters and their data types, refer to
alParams(3dm). The event parameter can be retrieved through
alGetEventParam(3dm).
It is important to note that non-scalar data type parameters will use
different calls for event data retrieval: alGetEventData(3dm) and
alGetParams(3dm). Again, please refer to alParams(3dm) for more
information.
EXAMPLE
The following example demonstrates how to retrieve the event data
information of an event with an AL_RATE parameter.
ALeventQueue eventq;
ALevent event;
ALvalue value;
.
.
.
/*
* Get event from event queue
*/
status = alNextEvent(eventq,event);
if(status == -1) {
fprintf(stderr,"Error retrieving event: %s",
alGetErrorString(oserror()));
}
/*
* Process the event.
*/
switch(alGetEventParam(event)) {
case AL_RATE:
Page 1
alGetEventValue(3dm)alGetEventValue(3dm)
value = alGetEventValue(event);
fprintf(stdout,"New Rate: %lf\n",
alFixedToDouble(value.ll));
break;
.
.
.
}
DIAGNOSTICS
Upon successful completion, alGetEventValue(3dm) returns an ALvalue union
with the particular event information. Otherwise, it returns an ALvalue
with its field set to zero, and sets an error number. This error number
can be retrieved with oserror(3C).
alGetEventValue can fail for the following reason:
AL_BAD_INVALID_EVENT event is invalid or null.
SEE ALSOalNewEvent(3dm), alNextEvent(3dm), alCheckEvent(3dm), alParams(3dm),
alGetEventData(3dm), alGetParams(3dm), oserror(3C)
Page 2