alIsSubtype(3dm) alIsSubtype(3dm)
alIsSubtype - indicate if one resource type is a subtype of another
#include <dmedia/audio.h>
int alIsSubtype(int type, int subtype)
type is a resource type for which you want to see if subtype is a
subtype. type can also be a resource, in which case alIsSubtype
uses the type of the given resource.
subtype is a resource type for which you want to see if type is a
supertype. subtype can also be a resource, in which case
alIsSubtype uses the type of the given resource.
All Audio Library software and hardware resources have types. Some types
are subtypes of others. alIsSubtype returns 1 if subtype is a subtype of
type; it returns 0 otherwise.
Note that alIsSubtype considers any resource type to be a subtype of
itself. This allows alIsSubtype to be used as a general mechanism for
comparing resource types.
The following code fragment takes a device dev and decides if it is an
input or output device. All input device types are subtypes of
AL_INPUT_DEVICE_TYPE; all output device types are subtypes of
AL_OUTPUT_DEVICE_TYPE.
ALpv t;
/*
* Get the type of the device, and decide if it's input or
* output. Adapt accordingly.
*/
if (alIsSubtype( AL_OUTPUT_DEVICE_TYPE, dev)) {
output = 1;
}
alIntro(3dm), alGetParams(3dm)
PPPPaaaaggggeeee 1111 [ Back ]
|