OpenAL Specification and Reference | ||
---|---|---|
<<< Previous | Next >>> |
The majority of AL state is associated with individual AL objects, and has to be set and queried referencing the objects. However, some state - e.g. processing errors - is defined context specific. AL has global state that affects all objects and processing equally. This state is set using a variety of functions, and can be queried using query functions. The majority of queries has to use the interface described in "Simple Queries".
Like OpenGL, AL uses a simplified interface for querying global state. The following functions accept a set of enumerations.
Legal values are e.g. DOPPLER_FACTOR, DOPPLER_VELOCITY, DISTANCE_MODEL.NULL destinations are quietly ignored. INVALID_ENUM is the response to errors in specifying paramName. The amount of memory required in the destination depends on the actual state requested. Usually, state variables are returned in only one or some of the formats above.
To query state controlled by Enable/Disable there is an additional IsEnabled function defined (see "Controlling AL Execution").
If a Get command is issued that returns value types different from the type of the value being obtained, a type converswion is performed. If GetBooleanv is called, a floating-point or integer value converts to FALSE if and only if it is zero (otherwise it converts to TRUE). If GetIntegerv is called, a boolean value is interpreted as either 1 or 0, and a floating-point value is rounded to the nearest integer. If GetFloatv is called, a boolean value is interpreted as either 1.0 or 0.0, an integer is coerced to floating point, and a double-presicion foating-point value is converted to single precision. Analogous conversions are carried out in the case of GetDoublev. If a value is so large in magnitude that it cannot be represented with the requested type, then the nearest value is representable using the requested type is returned.
![]() | Annotation (Query of Modes) |
---|---|
Modes (e.g. the current distance model) can be queried using the respective tokens. The recommended query command is GetIntegerv. |
The application can retrieve state information global to the current AL Context. GetString will return a pointer to a constant string. Valid values for param are VERSION, RENDERER, VENDOR, and EXTENSIONS, as well as the error codes defined by AL. The application can use GetString to retrieve a string for an error code.
<<< Previous | Home | Next >>> |
Object Paradigm | Time and Frequency |