BlitzMax/Modules/Audio/OpenAL 1.1

From Wikibooks, open books for an open world
Jump to: navigation, search

Contents

Constants[edit]

AL constants Description
AL_INVALID
AL_NONE
bad value
AL_FALSE Boolean False.
AL_TRUE Boolean True.
AL_SOURCE_RELATIVE Indicate Source has relative coordinates.
AL_CONE_INNER_ANGLE Directional source, inner cone angle, in degrees.
Range: [0-360]
Default: 360
AL_CONE_OUTER_ANGLE Directional source, outer cone angle, in degrees.
Range: [0-360]
Default: 360
AL_PITCH Specify the pitch to be applied, either at source,or on mixer results, at listener.
Range: [0.5-2.0]
Default: 1.0
AL_POSITION Specify the current location in three dimensional space.
OpenAL, like OpenGL, uses a right handed coordinate system, where in a frontal default view X (thumb) points right, Y points up (index finger), and Z points towards the viewer/camera (middle finger).
To switch from a left handed coordinate system, flip the sign on the Z coordinate.
Listener position is always in the world coordinate system.
AL_DIRECTION Specify the current direction.
AL_VELOCITY Specify the current velocity in three dimensional space.
AL_LOOPING Indicate whether source is looping.
Type: ALboolean?
Range: [AL_TRUE, AL_FALSE]
Default: FALSE.
AL_BUFFER Indicate the buffer to provide sound samples.
Type: ALuint.
Range: any valid Buffer id.
AL_GAIN Indicate the gain (volume amplification) applied.
Type: ALfloat.
Range: ]0.0- ]
A value of 1.0 means un-attenuated/unchanged.
Each division by 2 equals an attenuation of -6dB.
Each multiplicaton with 2 equals an amplification of +6dB.
A value of 0.0 is meaningless with respect to a logarithmic scale; it is interpreted as zero volume - the channel is effectively disabled.
AL_MIN_GAIN Indicate minimum source attenuation
Type: ALfloat
Range: [0.0 - 1.0]
AL_MAX_GAIN Indicate maximum source attenuation
Type: ALfloat
Range: [0.0 - 1.0]
AL_ORIENTATION Indicate listener orientation.
AL_CHANNEL_MASK Specify the channel mask. (Creative)
Type: ALuint
Range: [0 - 255]
AL_SOURCE_STATE
AL_INITIAL
AL_PLAYING
AL_PAUSED
AL_STOPPED
Source state information.
AL_BUFFERS_QUEUED
AL_BUFFERS_PROCESSED
Buffer Queue params
AL_SEC_OFFSET
AL_SAMPLE_OFFSET
AL_BYTE_OFFSET
Source buffer position information
AL_SOURCE_TYPE Source type (Static, Streaming or undetermined)
AL_STATIC Source is Static if a Buffer has been attached using AL_BUFFER
AL_STREAMING Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
AL_UNDETERMINED Source is undetermined when it has the NULL buffer attached
AL_FORMAT_MONO8
AL_FORMAT_STEREO8
AL_FORMAT_MONO16
AL_FORMAT_STEREO16
Sound samples: format specifier.
AL_REFERENCE_DISTANCE source specific reference distance
Type: ALfloat
Range: 0.0 - +inf at 0.0, no distance attenuation occurs. Default is 1.0.
AL_ROLLOFF_FACTOR source specific rolloff factor
Type: ALfloat
Range: 0.0 - +inf
AL_CONE_OUTER_GAIN Directional source, outer cone gain.
Default: 0.0
Range: [0.0 - 1.0]
AL_MAX_DISTANCE Indicate distance above which sources are not attenuated using the inverse clamped distance model.
Default: +inf
Type: ALfloat
AL_FREQUENCY
AL_BITS
AL_CHANNELS
AL_SIZE
frequency, in units of Hertz [Hz].
This is the number of samples per second. Half of the sample frequency marks the maximum significant frequency component.
AL_UNUSED
AL_PENDING
AL_PROCESSED
Buffer state.
not supported for public use (yet).
AL_NO_ERROR No Error
AL_INVALID_NAME Invalid Name paramater passed to AL call.
AL_ILLEGAL_ENUM
AL_INVALID_ENUM
Invalid parameter passed to AL call.
AL_INVALID_VALUE Invalid enum parameter value.
AL_ILLEGAL_COMMAND
AL_INVALID_OPERATION
Illegal call.
AL_OUT_OF_MEMORY No mojo.
AL_VENDOR
AL_VERSION
AL_RENDERER
AL_EXTENSIONS
Context strings: Vendor Name.
AL_DOPPLER_FACTOR Doppler scale. Default 1.0
AL_DOPPLER_VELOCITY Tweaks speed of propagation.
AL_SPEED_OF_SOUND Speed of Sound in units per second
AL_DISTANCE_MODEL
AL_INVERSE_DISTANCE
AL_INVERSE_DISTANCE_CLAMPED
AL_LINEAR_DISTANCE
AL_LINEAR_DISTANCE_CLAMPED
AL_EXPONENT_DISTANCE
AL_EXPONENT_DISTANCE_CLAMPED
Distance models

used in conjunction with DistanceModel

implicit: NONE, which disances distance attenuation.
ALC constants Description
ALC_FALSE False
ALC_TRUE True
ALC_FREQUENCY Frequency for mixing output buffer, in units of Hz
ALC_REFRESH Refresh intervals, in units of Hz
ALC_SYNC Flag, indicating a synchronous context
ALC_MONO_SOURCES A hint indicating how many sources should be capable of supporting mono data
ALC_STEREO_SOURCES A hint indicating how many sources should be capable of supporting stereo data
ALC_NO_ERROR There is no current error.
ALC_INVALID_DEVICE The device handle or specifier names an accessible driver/server
ALC_INVALID_CONTEXT The Context argument does not name a valid context.
ALC_INVALID_ENUM A token used is not valid, or not applicable.
ALC_INVALID_VALUE A value (e.g. Attribute) is not valid, or not applicable.
ALC_OUT_OF_MEMORY Unable to allocate memory.
ALC_DEFAULT_DEVICE_SPECIFIER The specifier string for the default device
ALC_DEVICE_SPECIFIER The specifier string for the device
ALC_EXTENSIONS A list of available context extensions separated by spaces.
ALC_MAJOR_VERSION The specification revision for this implementation (major version). NULL is an acceptable device.
ALC_MINOR_VERSION The specification revision for this implementation (minor version). NULL is an acceptable device.
ALC_ATTRIBUTES_SIZE The size (number of ALCint values) required for a zero-terminated attributes list, for the current context. NULL is an invalid device.
ALC_ALL_ATTRIBUTES Expects a destination of ALC_ATTRIBUTES_SIZE, and provides an attribute list for the current context of the specified device. NULL is an invalid device.
ALC_CAPTURE_DEVICE_SPECIFIER The name of the specified capture device, or a list of all available capture devices if no capture device is specified.
ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER The name of the default capture device
ALC_CAPTURE_SAMPLES The number of capture samples available. NULL is an invalid device.

Functions[edit]

OpenALInstalled[edit]

Function OpenALInstalled()

Description: Check if OpenAL is installed.

Returns: True if OpenAL is installed.

Information: This function allows you to determine whether OpenAL is installed on the current machine.

Globals[edit]

alcOpenDevice[edit]

Global alcOpenDevice( devicename$z )

Description: This function opens a device by name.

Information:

Parameters Description
devicename a null-terminated string describing a device

The return value will be NULL if there is an error.

Returns a pointer to the opened device. Will return NULL if a device can not be opened.

alcCloseDevice[edit]

Global alcCloseDevice( device )

Description: This function closes a device by name.

Information:

Parameters Description
device a pointer to an opened device
Possible Error States Description
ALC_INVALID_DEVICE The specified device name doesn't exist.

Any contexts and buffers within the device will be destroyed when the device is closed, and ALC_TRUE will be returned on success or ALC_FALSE on failure.

alcGetError[edit]

Global alcGetError( device )

Description: This function retrieves the current context error state.

Information:

Parameters Description
device a pointer to the device to retrieve the error state from

alcGetString[edit]

Global alcGetString:Byte Ptr( device,param )

Description: This function returns pointers to strings related to the context.

Information:

Parameters Description
device a pointer to the device to be queried
param an attribute to be retrieved:
ALC_DEFAULT_DEVICE_SPECIFIER
ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
ALC_DEVICE_SPECIFIER
ALC_CAPTURE_DEVICE_SPECIFIER
ALC_EXTENSIONS
Possible Error States Description
ALC_INVALID_ENUM The specified parameter is not valid.

ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.

ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.

ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters.

ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.

ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.

alcGetIntegerv[edit]

Global alcGetIntegerv( device,param,size,data:Int Ptr )

Description: This function returns integers related to the context.

Information:

Parameters Description
device a pointer to the device to be queried
param an attribute to be retrieved:
ALC_MAJOR_VERSION
ALC_MINOR_VERSION
ALC_ATTRIBUTES_SIZE
ALC_ALL_ATTRIBUTES
size the size of the destination buffer provided
data a pointer to the data to be returned
Possible Error States Description
ALC_INVALID_VALUE The specified data pointer or size is not valid.
ALC_INVALID_ENUM The specified parameter is not valid.
ALC_INVALID_DEVICE The specified device is not valid.
ALC_INVALID_CONTEXT The specified context is not valid.

The versions returned refer to the specification version that the implementation meets.

alcCreateContext[edit]

Global alcCreateContext( device,attrlist:Int Ptr )

Description: This function creates a context using a specified device.

Information:

Parameters Description
device a pointer to a device
attrlist a pointer to a set of attributes:
ALC_FREQUENCY
ALC_REFRESH
ALC_SYNC
Possible Error States Description
ALC_INVALID_VALUE An additional context can not be created for this device.
ALC_INVALID_DEVICE The specified device is not a valid output device.

Returns: A pointer to the new context (NULL on failure).

alcMakeContextCurrent[edit]

Global alcMakeContextCurrent( context )

Description: This function makes a specified context the current context.

Information:

Parameters Description
context a pointer to the new context
Possible Error States Description
ALC_INVALID_CONTEXT The specified context is invalid.

Returns ALC_TRUE on success, or ALC_FALSE on failure.

alcProcessContext[edit]

Global alcProcessContext( context )

Description: This function tells a context to begin processing.

Information:

Parameters Description
context a pointer to the new context
Possible Error States Description
ALC_INVALID_CONTEXT The specified context is invalid.

When a context is suspended, changes in OpenAL state will be accepted but will not be processed. alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.

alcSuspendContext[edit]

Global alcSuspendContext( context )

Description: This function suspends processing on a specified context.

Information:

Parameters Description
context a pointer to the context to be suspended
Possible Error States Description
ALC_INVALID_CONTEXT The specified context is invalid.

When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.

alcDestroyContext[edit]

Global alcDestroyContext( context )

Description: This function destroys a context.

Information:

Parameters Description
context a pointer to the new context
Possible Error States Description
ALC_INVALID_CONTEXT The specified context is invalid.

A context which is not current can be destroyed at any time (all sources within that context will also be deleted - buffers are not affected). alcMakeContextCurrent should be used to make sure the context to be destroyed is not current (NULL is valid for alcMakeContextCurrent).

alcGetCurrentContext[edit]

Global alcGetCurrentContext()

Description: This function retrieves the current context.

Returns: a pointer to the current context.

alcGetContextsDevice[edit]

Global alcGetContextsDevice( context )

Description: This function retrieves a context's device pointer.

Information:

Parameters Description
context a pointer to a context
Possible Error States Description
ALC_INVALID_CONTEXT The specified context is invalid.

Returns: a pointer to the specified context's device.

alcIsExtensionPresent[edit]

Global alcIsExtensionPresent( device,extName$z )

Description: This function queries if a specified context extension is available.

Information:

Parameters Description
device a pointer to the device to be queried for an extension
extName a null-terminated string describing the extension
Possible Error States Description
ALC_INVALID_VALUE The string pointer is not valid.

Returns ALC_TRUE if the extension is available, ALC_FALSE if the extension is not available.

alcGetProcAddress[edit]

Global alcGetProcAddress:Byte Ptr( device,funcName$z )

Description: This function retrieves the address of a specified context extension function.

Information:

Parameters Description
device a pointer to the device to be queried for the function
funcName a null-terminated string describing the function
Possible Error States Description
ALC_INVALID_VALUE The string pointer is not valid.

Returns the address of the function, or NULL if it is not found.

alcGetEnumValue[edit]

Global alcGetEnumValue( device,enumName$z )

Description: This function retrieves the enum value for a specified enumeration name.

Information:

Parameters Description
device a pointer to the device to be queried
enumName a null terminated string describing the enum value
Possible Error States Description
ALC_INVALID_VALUE The string pointer is not valid.

Returns the enum value described by the enumName string. This is most often used for querying an enum value for an ALC extension.

alcCaptureOpenDevice[edit]

Global alcCaptureOpenDevice( devicename$z,frequency,format,buffersize )

Description: This function opens a capture device by name.

Information:

Parameters Description
devicename a pointer to a device name string
frequency the frequency that the data should be captured at
format the requested capture buffer format
buffersize the size of the capture buffer
Possible Error States Description
ALC_INVALID_VALUE One of the parameters has an invalid value.
ALC_OUT_OF_MEMORY The specified device is invalid, or can not capture audio.

Returns the capture device pointer, or NULL on failure.

alcCaptureCloseDevice[edit]

Global alcCaptureCloseDevice( device )

Description: This function closes the specified capture device.

Information:

Parameters Description
device a pointer to a capture device
Possible Error States Description
ALC_INVALID_DEVICE The specified device is not a valid capture device.

Returns ALC_TRUE if the close operation was successful, ALC_FALSE on failure.

alcCaptureStart[edit]

Global alcCaptureStart( device )

Description: This function begins a capture operation.

Information:

Parameters Description
device a pointer to a capture device
Possible Error States Description
ALC_INVALID_DEVICE The specified device is not a valid capture device.

alcCaptureStart will begin recording to an internal ring buffer of the size specified when opening the capture device. The application can then retrieve the number of samples currently available using the ALC_CAPTURE_SAPMPLES token with alcGetIntegerv. When the application determines that enough samples are available for processing, then it can obtain them with a call to alcCaptureSamples.

alcCaptureStop[edit]

Global alcCaptureStop( device )

Description: This function stops a capture operation.

Information:

Parameters Description
device a pointer to a capture device
Possible Error States Description
ALC_INVALID_DEVICE The specified device is not a valid capture device.

alcCaptureSamples[edit]

Global alcCaptureSamples( device,buffer:Byte Ptr,samples )

Description: This function completes a capture operation.

Information:

Parameters Description
device a pointer to a capture device
buffer a pointer to a data buffer, which must be large enough to accommodate samples number of samples
samples the number of samples to be retrieved
Possible Error States Description
ALC_INVALID_VALUE The specified number of samples is larger than the number of available samples.
ALC_INVALID_DEVICE The specified device is not a valid capture device.

alEnable[edit]

Global alEnable( capability )

Description: This function enables a feature of the OpenAL driver.

Information:

Parameters Description
capability the name of a capability to enable
Possible Error States Description
AL_INVALID_ENUM The specified capability is not valid.
AL_INVALID_OPERATION There is no current context.

There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.

alDisable[edit]

Global alDisable( capability )

Description: This function disables a feature of the OpenAL driver.

Information:

Parameters Description
capability the name of a capability to disable
Possible Error States Description
AL_INVALID_ENUM The specified capability is not valid.
AL_INVALID_OPERATION There is no current context.

There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.

alIsEnabled[edit]

Global alIsEnabled( capability )

Description: This function returns a boolean indicating if a specific feature is enabled in the OpenAL

Information:

Parameters Description
capability the name of a capability to disable
Possible Error States Description
AL_INVALID_ENUM The specified capability is not valid.
AL_INVALID_OPERATION There is no current context.

Returns AL_TRUE if the capability is enabled, AL_FALSE if the capability is disabled. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.

alGetString[edit]

Global alGetString:Byte Ptr( param )

Description: This function retrieves an OpenAL string property.

Information:

Parameters Description
param The property to be returned:
AL_VENDOR
AL_VERSION
AL_RENDERER
AL_EXTENSIONS
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.

Returns a pointer to a null-terminated string.

alGetBooleanv[edit]

Global alGetBooleanv( param,data:Byte Ptr )

Description: This function retrieves a boolean OpenAL state.

Information:

Parameters Description
param the state to be returned:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
data a pointer to the location where the state will be stored
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_VALUE The specified data pointer is not valid.
AL_INVALID_OPERATION There is no current context.

alGetIntegerv[edit]

Global alGetIntegerv( param,data:Int Ptr )

Description: This function retrieves an integer OpenAL state.

Information:

Parameters Description
param the state to be returned:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
data a pointer to the location where the state will be stored
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_VALUE The specified data pointer is not valid.
AL_INVALID_OPERATION There is no current context.

alGetFloatv[edit]

Global alGetFloatv( param,data:Float Ptr )

Description: This function retrieves a floating point OpenAL state.

Information:

Parameters Description
param the state to be returned:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
data a pointer to the location where the state will be stored
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_VALUE The specified data pointer is not valid.
AL_INVALID_OPERATION There is no current context.

alGetDoublev[edit]

Global alGetDoublev( param,data:Double Ptr )

Description: This function retrieves a double precision floating point OpenAL state.

Information:

Parameters Description
param the state to be returned:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
data a pointer to the location where the state will be stored
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_VALUE The specified data pointer is not valid.
AL_INVALID_OPERATION There is no current context.

alGetBoolean[edit]

Global alGetBoolean( param )

Description: This function returns a boolean OpenAL state.

Information:

Parameters Description
param the state to be queried:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

The boolean state described by param will be returned.

alGetInteger[edit]

Global alGetInteger( param )

Description: This function returns an integer OpenAL state.

Information:

Parameters Description
param the state to be queried:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

The integer state described by param will be returned.

alGetFloat[edit]

Global alGetFloat#( param )

Description: This function returns a floating point OpenAL state.

Information:

Parameters Description
param the state to be queried:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

The floating point state described by param will be returned.

alGetDouble[edit]

Global alGetDouble!( param )

Description: This function returns a double precision floating point OpenAL state.

Information:

Parameters Description
param the state to be queried:
AL_DOPPLER_FACTOR
AL_SPEED_OF_SOUND
AL_DISTANCE_MODEL
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

The double value described by param will be returned.

alGetError[edit]

Global alGetError()

Description: This function returns the current error state and then clears the error state.

Information: Returns an Alenum representing the error state. When an OpenAL error occurs, the error state is set and will not be changed until the error state is retrieved using alGetError. Whenever alGetError is called, the error state is cleared and the last state (the current state when the call was made) is returned. To isolate error detection to a specific portion of code, alGetError should be called before the isolated section to clear the current error state.

alIsExtensionPresent[edit]

Global alIsExtensionPresent( extname$z )

Description: This function tests if a specific extension is available for the OpenAL driver.

Information:

Parameters Description
extname a null-terminated string describing the desired extension
Possible Error States Description
AL_INVALID_VALUE The specified extension string is not a valid pointer.

Returns AL_TRUE if the extension is available, AL_FALSE if the extension is not available.

alGetProcAddress[edit]

Global alGetProcAddress:Byte Ptr( fname$z )

Description: This function returns the address of an OpenAL extension function.

Information:

Parameters Description
fname a null-terminated string containing the function name

The return value is a pointer to the specified function. The return value will be NULL if the function is not found.

alGetEnumValue[edit]

Global alGetEnumValue( ename$z )

Description: This function returns the enumeration value of an OpenAL enum described by a string.

Information:

Parameters Description
ename a null-terminated string describing an OpenAL enum

Returns the actual ALenum described by a string. Returns NULL if the string doesnt describe a valid OpenAL enum.

alListenerf[edit]

Global alListenerf( param,value# )

Description: This function sets a floating point property for the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be set: AL_GAIN
value the ALfloat value to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alListener3f[edit]

Global alListener3f( param,value1#,value2#,value3# )

Description: This function sets a floating point property for the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to set:
AL_POSITION
AL_VELOCITY
v1, v2, v3 the value to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alListenerfv[edit]

Global alListenerfv( param,values:Float Ptr )

Description: This function sets a floating point-vector property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be set:
AL_POSITION
AL_VELOCITY
AL_ORIENTATION
values pointer to floating point-vector values
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alListeneri[edit]

Global alListeneri( param,value )

Description: This function sets an integer property of the listener.

Information:

Parameters Description
param the name of the attribute to be set
value the integer value to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

There are no integer listener attributes defined for OpenAL 1.1, but this function may be used by an extension.

alListener3i[edit]

Global alListener3i( param,value1,value2,value3 )

Description: This function sets an integer property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be set:
AL_POSITION
AL_VELOCITY
value1, value2, value3 the integer values to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alListeneriv[edit]

Global alListeneriv( param,values:Int Ptr )

Description: This function sets an integer property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be set:
AL_POSITION
AL_VELOCITY
AL_ORIENTATION
values pointer to the integer values to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGetListenerf[edit]

Global alGetListenerf( param,value:Float Ptr )

Description: This function retrieves a floating point property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be retrieved: AL_GAIN
value a pointer to the floating point value being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGetListener3f[edit]

Global alGetListener3f( param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )

Description: This function retrieves a set of three floating point values from a property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be retrieved:
AL_POSITION
AL_VELOCITY
value1, value2, value3 pointers to the three floating point being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGetListenerfv[edit]

Global alGetListenerfv( param,values:Float Ptr )

Description: This function retrieves a floating point-vector property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be retrieved:
AL_POSITION
AL_VELOCITY
AL_ORIENTATION
values a pointer to the floating point-vector value being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGetListeneri[edit]

Global alGetListeneri( param,value:Int Ptr )

Description: This function retrieves an integer property of the listener.

Information:

Parameters Description
param the name of the attribute to be retrieved
value a pointer to the integer value being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

There are no integer listener attributes defined for OpenAL 1.1, but this function may be used by an extension.

alGetListener3i[edit]

Global alGetListener3i( param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )

Description: This function retrieves an integer property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be retrieved:
AL_POSITION
AL_VELOCITY
value1, value2, value3 pointers to the integer values being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGetListeneriv[edit]

Global alGetListeneriv( param,values:Int Ptr )

Description: This function retrieves an integer property of the listener. The relevant properties are listed in the table Listener Properties.

Information:

Parameters Description
param the name of the attribute to be retrieved:
AL_POSITION
AL_VELOCITY
AL_ORIENTATION
values a pointer to the integer values being retrieved
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_OPERATION There is no current context.

alGenBuffers[edit]

Global alGenBuffers( n,buffers:Int Ptr )

Description: This Function generates one or more buffers, which contain audio data (see alBufferData). References To buffers are ALuint values, which are used wherever a buffer reference is needed (in calls such as alDeleteBuffers, alSourcei, alSourceQueueBuffers, and alSourceUnqueueBuffers).

Information:

Parameters Description
n the number of buffers To be generated
buffers pointer To an array of ALuint values which will store the names of the New buffers
Possible Error States Description
AL_INVALID_VALUE The buffer array isn't large enough to hold the number of buffers requested.
AL_OUT_OF_MEMORY There is not enough memory available To generate all the buffers requested.

If the requested number of buffers cannot be created, an error will be generated which can be detected with alGetError. If an error occurs, no buffers will be generated. If n equals zero, alGenBuffers does nothing and does not Return an error.

alDeleteBuffers[edit]

Global alDeleteBuffers( n,buffers:Int Ptr )

Description: This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See alSourcei and alSourceUnqueueBuffers for information on how to detach a buffer from a source.

Information:

Parameters Description
n the number of buffers to be deleted
buffers pointer to an array of buffer names identifying the buffers to be deleted
Possible Error States Description
AL_INVALID_OPERATION The buffer is still in use and can not be deleted.
AL_INVALID_NAME A buffer name is invalid.
AL_INVALID_VALUE The requested number of buffers can not be deleted.

If the requested number of buffers cannot be deleted, an error will be generated which can be detected with alGetError. If an error occurs, no buffers will be deleted. If n equals zero, alDeleteBuffers does nothing and will not return an error.

alIsBuffer[edit]

Global alIsBuffer( bid )

Description: This function tests if a buffer name is valid, returning AL_TRUE if valid, AL_FALSE if not.

Information:

Parameters Description
bid a buffer name to be tested for validity

The NULL buffer is always valid (see alSourcei for information on how the NULL buffer is used).

alBufferData[edit]

Global alBufferData( bid,format,data:Byte Ptr,size,freq )

Description: This function fills a buffer with audio data. All the pre-defined formats are PCM data, but this function may be used by extensions to load other data types as well.

Information:

Parameters Description
bid buffer name to be filled with data
format format type from among the following: AL_FORMAT_MONO8, AL_FORMAT_MONO16, AL_FORMAT_STEREO8, AL_FORMAT_STEREO16
data pointer to the audio data
size the size of the audio data in bytes
freq the frequency of the audio data
Possible Error States Description
AL_OUT_OF_MEMORY There is not enough memory available to create this buffer.
AL_INVALID_VALUE The size parameter is not valid for the format specified, the buffer is in use, or the data is a NULL pointer.
AL_INVALID_ENUM The specified format does not exist.

8-bit PCM data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero. 16-bit PCM data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Stereo data is expressed in interleaved format, left channel first. Buffers containing more than one channel of data will be played without 3D spatialization.

alBufferf[edit]

Global alBufferf( bid,param,value# )

Description: This Function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute To be set
value the ALfloat value To be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.

alBuffer3f[edit]

Global alBuffer3f( bid,param,value1#,value2#,value3# )

Description: This function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute to be set
value1, value2, value3 the ALfloat values to be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this function may be used by OpenAL extensions.

alBufferfv[edit]

Global alBufferfv( bid,param,values:Float Ptr )

Description: This function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute to be set
values a pointer to the ALfloat values to be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this function may be used by OpenAL extensions.

alBufferi[edit]

Global alBufferi( bid,param,value )

Description: This Function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute To be set
value the ALint value To be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.

alBuffer3i[edit]

Global alBuffer3i( bid,param,value1,value2,value3 )

Description: This Function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute To be set
value1, value2, value3 the ALint values To be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.

alBufferiv[edit]

Global alBufferiv( bid,param,values:Int Ptr )

Description: This Function sets a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
param the name of the attribute To be set
values a pointer To the ALint values To be set
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.

There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.

alGetBufferf[edit]

Global alGetBufferf( bid,param,value:Float Ptr )

Description: This Function retrieves a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute To be retrieved
value a pointer to an ALfloat To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.

alGetBuffer3f[edit]

Global alGetBuffer3f( bid,param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )

Description: This Function retrieves a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute To be retrieved
value1, value2, value3 pointers to a ALfloat values To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.

alGetBufferfv[edit]

Global alGetBufferfv( bid,param,values:Float Ptr )

Description: This Function retrieves a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute to be retrieved
values pointer To an ALfloat vector To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.

alGetBufferi[edit]

Global alGetBufferi( bid,param,value:Int Ptr )

Description: This Function retrieves a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute to be retrieved: AL_FREQUENCY, AL_BITS, AL_CHANNELS, AL_SIZE, AL_DATA
value a pointer To an ALint To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.

alGetBuffer3i[edit]

Global alGetBuffer3i( bid,param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )

Description: This Function retrieves a floating point property of a buffer.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute To be retrieved
value1, value2, value3 pointers To ALint values To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.

alGetBufferiv[edit]

Global alGetBufferiv( bid,param,values:Int Ptr )

Description: This Function retrieves a floating point property of a buffer. The relevant properties are listed in the table Buffer Properties.

Information:

Parameters Description
bid buffer name whose attribute is being retrieved
pname the name of the attribute To be retrieved
values pointer to an ALint vector To hold the retrieved data
Possible Error States Description
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.
AL_INVALID_VALUE The specified value pointer is not valid.

There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this function may be used by OpenAL extensions.

alGenSources[edit]

Global alGenSources( n,sources:Int Ptr )

Description: This Function generates one or more sources. References To sources are ALuint values, which are used wherever a source reference is needed (in calls such as alDeleteSources and alSourcei).

Information:

Parameters Description
n the number of sources To be generated
sources pointer To an array of ALuint values which will store the names of the New sources
Possible Error States Description
AL_OUT_OF_MEMORY There is not enough memory To generate all the requested sources.
AL_INVALID_VALUE There are not enough non-memory resources To create all the requested sources, or the array pointer is not valid.
AL_INVALID_OPERATION There is no context To create sources in.

If the requested number of sources cannot be created, an error will be generated which can be detected with alGetError. If an error occurs, no sources will be generated. If n equals zero, alGenSources does nothing and does not Return an error.

alDeleteSources[edit]

Global alDeleteSources( n,sources:Int Ptr )

Description: This function deletes one or more sources.

Information:

Parameters Description
n the number of sources to be deleted
sources pointer to an array of source names identifying the sources to be deleted
Possible Error States Description
AL_INVALID_NAME at least one specified source is not valid, or an attempt is being made to delete more sources than exist.
AL_INVALID_OPERATION There is no current context.

If the requested number of sources cannot be deleted, an error will be generated which can be detected with alGetError. If an error occurs, no sources will be deleted. If n equals zero, alDeleteSources does nothing and will not return an error. A playing source can be deleted - the source will be stopped and then deleted.

alIsSource[edit]

Global alIsSource( sid )

Description: This function tests if a source name is valid, returning AL_TRUE if valid and AL_FALSE if not.

Information:

Parameters Description
sid a source name to be tested for validity
Possible Error States Description
AL_INVALID_OPERATION There is no current context.

alSourcef[edit]

Global alSourcef( sid,param,value# )

Description: This function sets a floating point property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_PITCH
AL_GAIN
AL_MAX_DISTANCE
AL_ROLLOFF_FACTOR
AL_REFERENCE_DISTANCE
AL_MIN_GAIN
AL_MAX_GAIN
AL_CONE_OUTER_GAIN
value the value to set the attribute t
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alSource3f[edit]

Global alSource3f( sid,param,value1#,value2#,value3# )

Description: This function sets a source property requiring three floating point values. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
v1, v2, v3 the three ALfloat values which the attribute will be set to
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

This function is an alternative to alSourcefv.

alSourcefv[edit]

Global alSourcefv( sid,param,values:Float Ptr )

Description: This function sets a source property requiring three floating point values. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
values a pointer to the vector to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

This function is an alternative to alSource3f.

alSourcei[edit]

Global alSourcei( sid,param,value )

Description: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_SOURCE_RELATIVE
AL_CONE_INNER_ANGLE
AL_CONE_OUTER_ANGLE
AL_LOOPING
AL_BUFFER
AL_SOURCE_STATE
value a pointer to the vector to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The buffer name zero is reserved as a "NULL Buffer" and is accepted by alSourcei(..., AL_BUFFER, ...) as a valid buffer of zero length. The NULL Buffer is extremely useful for detaching buffers from a source which were attached using this call or with alSourceQueueBuffers.

alSource3i[edit]

Global alSource3i( sid,param,value1,value2,value3 )

Description: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
value1, value2, value3 the values to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alSourceiv[edit]

Global alSourceiv( sid,param,values:Int Ptr )

Description: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being set
param the name of the attribute to set:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
values the values to set the attribute to
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSourcef[edit]

Global alGetSourcef( sid,param,value:Float Ptr )

Description: This function retrieves a floating point property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
param the name of the attribute to retrieve:
AL_PITCH
AL_GAIN
AL_MIN_GAIN
AL_MAX_GAIN
AL_MAX_DISTANCE
AL_ROLLOFF_FACTOR
AL_CONE_OUTER_GAIN
AL_CONE_INNER_ANGLE
AL_CONE_OUTER_ANGLE
AL_REFERENCE_DISTANCE
value a pointer to the floating point value being retrieved
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSource3f[edit]

Global alGetSource3f( sid,param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )

Description: This function retrieves three floating point values representing a property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
param the name of the attribute to retrieve:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
value1,value2,value3 pointers to the values to retrieve
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSourcefv[edit]

Global alGetSourcefv( sid,param,values:Float Ptr )

Description: This function retrieves a floating point-vector property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
param the name of the attribute to retrieve:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
values a pointer to the vector to retrieve
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSourcei[edit]

Global alGetSourcei( sid,param,value:Int Ptr )

Description: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
pname the name of the attribute to retrieve:
AL_SOURCE_RELATIVE
AL_BUFFER
AL_SOURCE_STATE
AL_BUFFERS_QUEUED
AL_BUFFERS_PROCESSED
value a pointer to the integer value being retrieved
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSource3i[edit]

Global alGetSource3i( sid,param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )

Description: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
pname the name of the attribute to retrieve:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
value1, value2, value3 pointers to the integer values being retrieved
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alGetSourceiv[edit]

Global alGetSourceiv( sid,param,values:Int Ptr )

Description: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.

Information:

Parameters Description
sid source name whose attribute is being retrieved
pname the name of the attribute to retrieve:
AL_POSITION
AL_VELOCITY
AL_DIRECTION
values pointers to the integer values being retrieved
Possible Error States Description
AL_INVALID_VALUE The value given is out of range.
AL_INVALID_ENUM The specified parameter is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alSourcePlayv[edit]

Global alSourcePlayv( ns,sids:Int Ptr )

Description: This function plays a set of sources.

Information:

Parameters Description
ns the number of sources to be played
sids a pointer to an array of sources to be played
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The playing sources will have their state changed to AL_PLAYING. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the AL_STOPPED state.

alSourceStopv[edit]

Global alSourceStopv( ns,sids:Int Ptr )

Description: This function stops a set of sources.

Information:

Parameters Description
ns the number of sources to stop
sids a pointer to an array of sources to be stopped
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The stopped sources will have their state changed to AL_STOPPED.

alSourceRewindv[edit]

Global alSourceRewindv( ns,sids:Int Ptr )

Description: This function stops a set of sources and sets all their states to AL_INITIAL.

Information:

Parameters Description
ns the number of sources to be rewound
sids a pointer to an array of sources to be rewound
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alSourcePausev[edit]

Global alSourcePausev( ns,sids:Int Ptr )

Description: This function pauses a set of sources.

Information:

Parameters Description
ns the number of sources to be paused
sids a pointer to an array of sources to be paused
Possible Error States Description
AL_INVALID_VALUE The value pointer given is not valid.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The paused sources will have their state changed to AL_PAUSED.

alSourcePlay[edit]

Global alSourcePlay( sid )

Description: This function plays a source.

Information:

Parameters Description
sid the name of the source to be played
Possible Error States Description
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The playing source will have its state changed to AL_PLAYING. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the AL_STOPPED state.

alSourceStop[edit]

Global alSourceStop( sid )

Description: This function stops a source.

Information:

Parameters Description
sid the name of the source to be stopped
Possible Error States Description
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The stopped source will have its state changed to AL_STOPPED.

alSourceRewind[edit]

Global alSourceRewind( sid )

Description: This function stops the source and sets its state to AL_INITIAL.

Information:

Parameters Description
sid the name of the source to be rewound
Possible Error States Description
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

alSourcePause[edit]

Global alSourcePause( sid )

Description: This function pauses a source.

Information:

Parameters Description
sid the name of the source to be paused
Possible Error States Description
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The paused source will have its state changed to AL_PAUSED.

alSourceQueueBuffers[edit]

Global alSourceQueueBuffers( sid,numEntries,bids:Int Ptr )

Description: This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using an alSourcei call to retrieve AL_BUFFERS_PROCESSED.

Information:

Parameters Description
sid the name of the source to queue buffers onto
numEntries the number of buffers to be queued
bids a pointer to an array of buffer names to be queued
Possible Error States Description
AL_INVALID_NAME at least one specified buffer name is not valid, or the specified source name is not valid.
AL_INVALID_OPERATION There is no current context, an attempt was made to add a new buffer which is not the same format as the buffers already in the queue, or the source already has a static buffer attached.

When first created, a source will be of type AL_UNDETERMINED. A successful alSourceQueueBuffers call will change the source type to AL_STREAMING.

alSourceUnqueueBuffers[edit]

Global alSourceUnqueueBuffers( sid,numEntries,bids:Int Ptr )

Description: This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using an alSourcei call to retrieve AL_BUFFERS_PROCESSED, which is the maximum number of buffers that can be unqueued using this call.

Information:

Parameters Description
sid the name of the source to unqueue buffers from
numEntries the number of buffers to be unqueued
bids a pointer to an array of buffer names that were removed
Possible Error States Description
AL_INVALID_VALUE at least one buffer can not be unqueued because it has not been processed yet.
AL_INVALID_NAME The specified source name is not valid.
AL_INVALID_OPERATION There is no current context.

The unqueue operation will only take place if all n buffers can be removed from the queue.

alDopplerFactor[edit]

Global alDopplerFactor( value# )

Description: This function selects the OpenAL Doppler factor value.

Information:

Parameters Description
value the Doppler scale value to set
Possible Error States Description
AL_INVALID_VALUE The specified value is not valid.
AL_INVALID_OPERATION There is no current context.

The default Doppler factor value is 1.0.

alDopplerVelocity[edit]

Global alDopplerVelocity( value# )

Description: This function selects the speed of sound for use in Doppler calculations.

Information:

Parameters Description
value the speed of sound value to set
Possible Error States Description
AL_INVALID_VALUE The specified value is not valid.
AL_INVALID_OPERATION There is no current context.

The default speed of sound value is 343.3.

alSpeedOfSound[edit]

Global alSpeedOfSound( value# )

Description: This function selects the speed of sound for use in Doppler calculations.

Information:

Parameters Description
value# the speed of sound value to set
Possible Error States Description
AL_INVALID_VALUE The specified value is not valid.
AL_INVALID_OPERATION There is no current context.

The default speed of sound value is 343.3.

alDistanceModel[edit]

Global alDistanceModel( distanceModel )

Description: This function selects the OpenAL distance model.

The AL_INVERSE_DISTANCE model works according to the following formula:

G_dB = AL_GAIN - 20log10(1 + AL_ROLLOFF_FACTOR*(distance - AL_REFERENCE_DISTANCE)/AL_REFERENCE_DISTANCE));
G_dB = min(G_dB, AL_MAX_GAIN);
G_dB = max(G_dB, AL_MIN_GAIN);

The AL_INVERSE_DISTANCE_CLAMPED model works according to the following formula:

distance = max(distance, AL_REFERENCE_DISTANCE);
distance = min(distance, AL_MAX_DISTANCE);
G_dB = AL_GAIN - 20log10(1 + AL_ROLLOFF_FACTOR*(distance - AL_REFERENCE_DISTANCE)/AL_REFERENCE_DISTANCE));
G_dB = min(G_dB, AL_MAX_GAIN);
G_dB = max(G_dB, AL_MIN_GAIN);

The AL_NONE model works according to the following formula:

G_db = AL_GAIN;

Information:

Parameters Description
distanceModel the distance model to be set:
AL_NONE
AL_INVERSE_DISTANCE
AL_INVERSE_DISTANCE_CLAMPED
Possible Error States Description
AL_INVALID_VALUE The specified distance model is not valid.
AL_INVALID_OPERATION There is no current context.

The default distance model in OpenAL is AL_INVERSE_DISTANCE_CLAMPED.