Managing Buffer Names

AL provides calls to obtain Buffer names, to request deletion of a Buffer object associated with a valid Buffer name, and to validate a Buffer name. Calls to control Buffer attributes are also provided.

Requesting Buffers Names

The application requests a number of Buffers using GenBuffers.

void GenBuffers ( sizei n , uint * bufferNames );

Releasing Buffer Names

The application requests deletion of a number of Buffers by calling DeleteBuffers.

Once deleted, Names are no longer valid for use with AL function calls. Any such use will cause an INVALID_NAME error. The implementation is free to defer actual release of resources.

void DeleteBuffers ( sizei n , uint * bufferNames );

IsBuffer(bname) can be used to verify deletion of a buffer. Deleting bufferName 0 is a legal NOP in both scalar and vector forms of the command. The same is true for unused buffer names, e.g. such as not allocated yet, or as released already.

Validating a Buffer Name

The application can verify whether a buffer Name is valid using the IsBuffer query.

boolean IsBuffer ( uint bufferName);