| OpenAL-1.3.1.1: A binding to the OpenAL cross-platform 3D audio API | Source code | Contents | Index
Sound.OpenAL.AL.Errors |
Portability | portable
Stability | provisional
Maintainer | sven.panne@aedion.de
Description
This module corresponds to section 2.7 (AL Errors) of the OpenAL Specification and Reference (version 1.1).
Synopsis
data ALError = ALError ALErrorCategory String
data ALErrorCategory
= ALInvalidEnum
| ALInvalidValue
| ALInvalidOperation
| ALInvalidName
| ALOutOfMemory
alErrors :: GettableStateVar [ALError]
Documentation
data ALError | Source
AL errors consist of a general error category and a description of what went wrong.
Constructors
ALError ALErrorCategory String |
Instances
Eq ALError
Ord ALError
Show ALError
data ALErrorCategory | Source
General AL error categories.
Constructors
ALInvalidEnum |
ALInvalidValue |
ALInvalidOperation |
ALInvalidName |
ALOutOfMemory |
Instances
Eq ALErrorCategory
Ord ALErrorCategory
Show ALErrorCategory
alErrors :: GettableStateVar [ALError] | Source
OpenAL detects only a subset of those conditions that could be considered errors. This is because in many cases error checking would adversely impact the performance of an error-free program. The state variable `alErrors` is used to obtain error information. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they occur, do not affect this recorded code. When `alErrors` is read, the error is returned and the flag is cleared, so that a further error will again record its code. If reading `alErrors` returns `[]` then there has been no detectable error since the last time `alErrors` (or since the AL was initialized). When an error flag is set, results of AL operations are undefined only if `ALOutOfMemory` has occurred. In other cases, the command generating the error is ignored so that it has no effect on AL state or output buffer contents. If the error generating command returns a value, it returns zero. If the generating command modifies values through a pointer argument, no change is made to these values. These error semantics apply only to AL errors, not to system errors such as memory access errors.
Produced by Haddock version 0.9