ObjectAL
 All Classes Functions Variables Properties Pages
Class Methods | List of all members
ALWrapper Class Reference

A thin wrapper around the C OpenAL API, with a few convenience methods thrown in. More...

#import <ALWrapper.h>

Inheritance diagram for ALWrapper:

Class Methods

(bool) + genBuffers:numBuffers:
 Generate buffers. More...
 
(ALuint) + genBuffer
 Generate a buffer. More...
 
(bool) + deleteBuffers:numBuffers:
 Delete buffers. More...
 
(bool) + deleteBuffer:
 Delete a buffer. More...
 
(bool) + isBuffer:
 Check if the speified buffer exists. More...
 
(bool) + bufferData:format:data:size:frequency:
 Load data into a buffer. More...
 
(bool) + bufferf:parameter:value:
 Write a float paramter to a buffer. More...
 
(bool) + buffer3f:parameter:v1:v2:v3:
 Write a 3 float paramter to a buffer. More...
 
(bool) + bufferfv:parameter:values:
 Write a float array paramter to a buffer. More...
 
(bool) + bufferi:parameter:value:
 Write an integer paramter to a buffer. More...
 
(bool) + buffer3i:parameter:v1:v2:v3:
 Write a 3 integer paramter to a buffer. More...
 
(bool) + bufferiv:parameter:values:
 Write an integer array paramter to a buffer. More...
 
(ALfloat) + getBufferf:parameter:
 Read a float paramter from a buffer. More...
 
(bool) + getBuffer3f:parameter:v1:v2:v3:
 Read a 3 float paramter from a buffer. More...
 
(bool) + getBufferfv:parameter:values:
 Read a float array paramter from a buffer. More...
 
(ALint) + getBufferi:parameter:
 Read an integer paramter from a buffer. More...
 
(bool) + getBuffer3i:parameter:v1:v2:v3:
 Read a 3 integer paramter from a buffer. More...
 
(bool) + getBufferiv:parameter:values:
 Read an integer array paramter from a buffer. More...
 
(bool) + genSources:numSources:
 Generate sources. More...
 
(ALuint) + genSource
 Generate a source. More...
 
(bool) + deleteSources:numSources:
 Delete sources. More...
 
(bool) + deleteSource:
 Delete a source. More...
 
(bool) + isSource:
 Check if the speified source exists. More...
 
(bool) + sourcePlay:
 Play a source. More...
 
(bool) + sourcePlayv:numSources:
 Play a bunch of sources. More...
 
(bool) + sourcePause:
 Pause a source. More...
 
(bool) + sourcePausev:numSources:
 Pause a bunch of sources. More...
 
(bool) + sourceStop:
 Stop a source. More...
 
(bool) + sourceStopv:numSources:
 Stop a bunch of sources. More...
 
(bool) + sourceRewind:
 Rewind a source. More...
 
(bool) + sourceRewindv:numSources:
 Rewind a bunch of sources. More...
 
(bool) + sourceQueueBuffers:numBuffers:bufferIds:
 Queue buffers into a source for sequential playback. More...
 
(bool) + sourceUnqueueBuffers:numBuffers:bufferIds:
 Unqueue previously queued buffers. More...
 
(bool) + sourcef:parameter:value:
 Write a float paramter to a source. More...
 
(bool) + source3f:parameter:v1:v2:v3:
 Write a 3 float paramter to a source. More...
 
(bool) + sourcefv:parameter:values:
 Write a float array paramter to a source. More...
 
(bool) + sourcei:parameter:value:
 Write an integer paramter to a source. More...
 
(bool) + source3i:parameter:v1:v2:v3:
 Write a 3 integer paramter to a source. More...
 
(bool) + sourceiv:parameter:values:
 Write an integer array paramter to a source. More...
 
(ALfloat) + getSourcef:parameter:
 Read a float paramter from a source. More...
 
(bool) + getSource3f:parameter:v1:v2:v3:
 Read a 3 float paramter from a source. More...
 
(bool) + getSourcefv:parameter:values:
 Read a float array paramter from a source. More...
 
(ALint) + getSourcei:parameter:
 Read an integer paramter from a source. More...
 
(bool) + getSource3i:parameter:v1:v2:v3:
 Read a 3 integer paramter from a source. More...
 
(bool) + getSourceiv:parameter:values:
 Read an integer array paramter from a source. More...
 
(bool) + listenerf:value:
 Write a float paramter to the current listener. More...
 
(bool) + listener3f:v1:v2:v3:
 Write a 3 float paramter to the current listener. More...
 
(bool) + listenerfv:values:
 Write a float array paramter to the current listener. More...
 
(bool) + listeneri:value:
 Write an integer paramter to the current listener. More...
 
(bool) + listener3i:v1:v2:v3:
 Write a 3 integer paramter to the current listener. More...
 
(bool) + listeneriv:values:
 Write an integer array paramter to the current listener. More...
 
(ALfloat) + getListenerf:
 Read a float paramter from the current listener. More...
 
(bool) + getListener3f:v1:v2:v3:
 Read a 3 float paramter from the current listener. More...
 
(bool) + getListenerfv:values:
 Read a float array paramter from the current listener. More...
 
(ALint) + getListeneri:
 Read an integer paramter from the current listener. More...
 
(bool) + getListener3i:v1:v2:v3:
 Read a 3 integer paramter from the current listener. More...
 
(bool) + getListeneriv:values:
 Read an integer array paramter from the current listener. More...
 
(bool) + enable:
 Enable a capability. More...
 
(bool) + disable:
 Disable a capability. More...
 
(bool) + isEnabled:
 Check if a capability is enabled. More...
 
(bool) + getBoolean:
 Get a boolean parameter. More...
 
(ALdouble) + getDouble:
 Get a double parameter. More...
 
(ALfloat) + getFloat:
 Get a float parameter. More...
 
(ALint) + getInteger:
 Get an integer parameter. More...
 
(NSString *) + getString:
 Get a string parameter. More...
 
(NSArray *) + getNullSeparatedStringList:
 Get a string list parameter. More...
 
(NSArray *) + getSpaceSeparatedStringList:
 Get a string list parameter. More...
 
(bool) + getBooleanv:values:
 Get a boolean array parameter. More...
 
(bool) + getDoublev:values:
 Get a double array parameter. More...
 
(bool) + getFloatv:values:
 Get a float array parameter. More...
 
(bool) + getIntegerv:values:
 Get an integer array parameter. More...
 
(bool) + distanceModel:
 Set the distance model. More...
 
(bool) + dopplerFactor:
 Set the doppler factor. More...
 
(bool) + speedOfSound:
 Set the speed of sound. More...
 
(bool) + isExtensionPresent:
 Check if an extension is present. More...
 
(void *) + getProcAddress:
 Get the address of a procedure. More...
 
(ALenum) + getEnumValue:
 Get the enum value from its name. More...
 
(ALCdevice *) + openDevice:
 Open a device. More...
 
(bool) + closeDevice:
 Close a device. More...
 
(ALCcontext *) + createContext:attributes:
 Create an OpenAL context. More...
 
(bool) + makeContextCurrent:
 Make the specified context the current context. More...
 
(bool) + makeContextCurrent:deviceReference:
 Make the specified context the current context, passing in a device reference for more informative logging info. More...
 
(void) + processContext:
 Process a context. More...
 
(void) + suspendContext:
 Suspend a context. More...
 
(void) + destroyContext:
 Destroy a context. More...
 
(ALCcontext *) + getCurrentContext
 Get the current context. More...
 
(ALCdevice *) + getContextsDevice:
 Get the device a context was created from. More...
 
(ALCdevice *) + getContextsDevice:deviceReference:
 Get the device a context was created from, passing in a device reference for more informative logging info. More...
 
(bool) + isExtensionPresent:name:
 Check if an extension is present on a device. More...
 
(void *) + getProcAddress:name:
 Get the address of a procedure for a device. More...
 
(ALenum) + getEnumValue:name:
 Get the enum value from its name. More...
 
(NSString *) + getString:attribute:
 Get a string attribute. More...
 
(NSArray *) + getNullSeparatedStringList:attribute:
 Get a string list attribute. More...
 
(NSArray *) + getSpaceSeparatedStringList:attribute:
 Get a string list attribute. More...
 
(ALint) + getInteger:attribute:
 Get an integer attribute. More...
 
(bool) + getIntegerv:attribute:size:data:
 Get an integer array attribute. More...
 
(ALCdevice *) + openCaptureDevice:frequency:format:bufferSize:
 UNSUPPORTED ON IOS Open an audio capture device. More...
 
(bool) + closeCaptureDevice:
 Close a capture device. More...
 
(bool) + startCapture:
 Start capturing audio data. More...
 
(bool) + stopCapture:
 Stop capturing audio data. More...
 
(bool) + captureSamples:buffer:numSamples:
 Get captured samples from a device. More...
 
(ALdouble) + getMixerOutputDataRate
 Get the iOS device's mixer outut data rate. More...
 
(bool) + setMixerOutputDataRate:
 Set the iOS device's mixer output data rate. More...
 
(bool) + bufferDataStatic:format:data:size:frequency:
 Load data into a buffer. More...
 
(bool) + asaGetListenerb:
 Read a boolean ASA property from a listener. More...
 
(ALint) + asaGetListeneri:
 Read an integer ASA property from a listener. More...
 
(ALfloat) + asaGetListenerf:
 Read a floating point ASA property from a listener. More...
 
(bool) + asaListenerb:value:
 Write a boolean ASA value to a listener. More...
 
(bool) + asaListeneri:value:
 Write an integer ASA value to a listener. More...
 
(bool) + asaListenerf:value:
 Write a floating point ASA value to a listener. More...
 
(bool) + asaGetSourceb:property:
 Read a boolean ASA property from a source. More...
 
(ALint) + asaGetSourcei:property:
 Read an integer ASA property from a source. More...
 
(ALfloat) + asaGetSourcef:property:
 Read a floating point ASA property from a source. More...
 
(bool) + asaSourceb:property:value:
 Write a boolean ASA value to a source. More...
 
(bool) + asaSourcei:property:value:
 Write an integer ASA value to a source. More...
 
(bool) + asaSourcef:property:value:
 Write a floating point ASA value to a source. More...
 
(bool) + setRenderingQuality:
 Set the rendering quality. More...
 
(ALint) + getRenderingQuality
 Get the rendering quality. More...
 
(bool) + addNotification:onSource:callback:userData:
 Add a notification callback to a source. More...
 
(bool) + removeNotification:onSource:callback:userData:
 Remove a notification callback from a source. More...
 

Detailed Description

A thin wrapper around the C OpenAL API, with a few convenience methods thrown in.

Wherever possible, methods return the requested data rather than requiring a pointer to be passed in. Besides collecting the API calls into a single global object, all calls are combined with an error check. Any OpenAL errors that occur will be logged if error logging is enabled.

Method Documentation

+ (bool) addNotification: (ALuint)  notificationID
onSource: (ALuint)  source
callback: (alSourceNotificationProc)  callback
userData: (void*)  userData 

Add a notification callback to a source.

The following notification types are recognized: AL_SOURCE_STATE - Sent when a source's state changes. AL_BUFFERS_PROCESSED - Sent when all buffers have been processed. AL_QUEUE_HAS_LOOPED - Sent when a looping source has looped to it's start point.

Parameters
notificationIDThe kind of notification to be informed of (see above).
sourceThe source ID.
callbackThe function to call for notification.
userDataa pointer that will be passed to the callback.
Returns
TRUE if the operation was successful.
+ (bool) asaGetListenerb: (ALuint)  property

Read a boolean ASA property from a listener.

Parameters
propertyThe property to read.
Returns
The property's value.
+ (ALfloat) asaGetListenerf: (ALuint)  property

Read a floating point ASA property from a listener.

Parameters
propertyThe property to read.
Returns
The property's value.
+ (ALint) asaGetListeneri: (ALuint)  property

Read an integer ASA property from a listener.

Parameters
propertyThe property to read.
Returns
The property's value.
+ (bool) asaGetSourceb: (ALuint)  sourceId
property: (ALuint)  property 

Read a boolean ASA property from a source.

Parameters
sourceIdThe source's ID.
propertyThe property to read.
Returns
The property's value.
+ (ALfloat) asaGetSourcef: (ALuint)  sourceId
property: (ALuint)  property 

Read a floating point ASA property from a source.

Parameters
sourceIdThe source's ID.
propertyThe property to read.
Returns
The property's value.
+ (ALint) asaGetSourcei: (ALuint)  sourceId
property: (ALuint)  property 

Read an integer ASA property from a source.

Parameters
sourceIdThe source's ID.
propertyThe property to read.
Returns
The property's value.
+ (bool) asaListenerb: (ALuint)  property
value: (bool)  value 

Write a boolean ASA value to a listener.

Parameters
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) asaListenerf: (ALuint)  property
value: (ALfloat)  value 

Write a floating point ASA value to a listener.

Parameters
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) asaListeneri: (ALuint)  property
value: (ALint)  value 

Write an integer ASA value to a listener.

Parameters
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) asaSourceb: (ALuint)  sourceId
property: (ALuint)  property
value: (bool)  value 

Write a boolean ASA value to a source.

Parameters
sourceIdThe source's ID.
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) asaSourcef: (ALuint)  sourceId
property: (ALuint)  property
value: (ALfloat)  value 

Write a floating point ASA value to a source.

Parameters
sourceIdThe source's ID.
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) asaSourcei: (ALuint)  sourceId
property: (ALuint)  property
value: (ALint)  value 

Write an integer ASA value to a source.

Parameters
sourceIdThe source's ID.
propertyThe property to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) buffer3f: (ALuint)  bufferId
parameter: (ALenum)  parameter
v1: (ALfloat)  v1
v2: (ALfloat)  v2
v3: (ALfloat)  v3 

Write a 3 float paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterthe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) buffer3i: (ALuint)  bufferId
parameter: (ALenum)  parameter
v1: (ALint)  v1
v2: (ALint)  v2
v3: (ALint)  v3 

Write a 3 integer paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) bufferData: (ALuint)  bufferId
format: (ALenum)  format
data: (const ALvoid*)  data
size: (ALsizei)  size
frequency: (ALsizei)  frequency 

Load data into a buffer.

Parameters
bufferIdThe ID of the buffer to load data into.
formatThe format of the data being loaded (typically AL_FORMAT_MONO16 or AL_FORMAT_STEREO16).
dataThe audio data.
sizeThe size of the data in bytes.
frequencyThe sample frequency of the data.
+ (bool) bufferDataStatic: (ALuint)  bufferId
format: (ALenum)  format
data: (const ALvoid*)  data
size: (ALsizei)  size
frequency: (ALsizei)  frequency 

Load data into a buffer.

Unlike "bufferData", with this method the buffer will use the passed in data buffer direcly rather than allocating its own memory and copying from the data buffer.

Parameters
bufferIdThe ID of the buffer to load data into.
formatThe format of the data being loaded (typically AL_FORMAT_MONO16 or AL_FORMAT_STEREO16).
dataThe audio data.
sizeThe size of the data in bytes.
frequencyThe sample frequency of the data.
+ (bool) bufferf: (ALuint)  bufferId
parameter: (ALenum)  parameter
value: (ALfloat)  value 

Write a float paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) bufferfv: (ALuint)  bufferId
parameter: (ALenum)  parameter
values: (ALfloat*)  values 

Write a float array paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) bufferi: (ALuint)  bufferId
parameter: (ALenum)  parameter
value: (ALint)  value 

Write an integer paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) bufferiv: (ALuint)  bufferId
parameter: (ALenum)  parameter
values: (ALint*)  values 

Write an integer array paramter to a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) captureSamples: (ALCdevice*)  device
buffer: (ALCvoid*)  buffer
numSamples: (ALCsizei)  numSamples 

Get captured samples from a device.

Parameters
devicethe device to fetch samples from.
bufferthe buffer to copy the samples into.
numSamplesthe number of samples to fetch.
+ (bool) closeCaptureDevice: (ALCdevice*)  device

Close a capture device.

Parameters
deviceThe device to close.
Returns
TRUE if the operation was successful.
+ (bool) closeDevice: (ALCdevice*)  device

Close a device.

Parameters
deviceThe device to close.
Returns
TRUE if the operation was successful.
+ (ALCcontext *) createContext: (ALCdevice*)  device
attributes: (ALCint*)  attributes 

Create an OpenAL context.

Parameters
deviceThe device to open the context on.
attributesThe attributes to use when creating the context.
Returns
The new context.
+ (bool) deleteBuffer: (ALuint)  bufferId

Delete a buffer.

Parameters
bufferIdThe ID of the buffer to delete.
Returns
TRUE if the operation was successful.
+ (bool) deleteBuffers: (ALuint*)  bufferIds
numBuffers: (ALsizei)  numBuffers 

Delete buffers.

Parameters
bufferIdsPointer to an array containing the buffer IDs.
numBuffersthe number of buffers to delete.
Returns
TRUE if the operation was successful.
+ (bool) deleteSource: (ALuint)  sourceId

Delete a source.

Parameters
sourceIdThe ID of the source to delete.
Returns
TRUE if the operation was successful.
+ (bool) deleteSources: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Delete sources.

Parameters
sourceIdsPointer to an array containing the source IDs.
numSourcesthe number of sources to delete.
Returns
TRUE if the operation was successful.
+ (void) destroyContext: (ALCcontext*)  context

Destroy a context.

Parameters
contextThe contect to destroy.
Returns
TRUE if the operation was successful.
+ (bool) disable: (ALenum)  capability

Disable a capability.

Parameters
capabilityThe capability to disable.
Returns
TRUE if the operation was successful.
+ (bool) distanceModel: (ALenum)  value

Set the distance model.

Parameters
valueThe value to set.
Returns
TRUE if the operation was successful.
+ (bool) dopplerFactor: (ALfloat)  value

Set the doppler factor.

Parameters
valueThe value to set.
Returns
TRUE if the operation was successful.
+ (bool) enable: (ALenum)  capability

Enable a capability.

Parameters
capabilityThe capability to enable.
Returns
TRUE if the operation was successful.
+ (ALuint) genBuffer

Generate a buffer.

Returns
the buffer's ID.
+ (bool) genBuffers: (ALuint*)  bufferIds
numBuffers: (ALsizei)  numBuffers 

Generate buffers.

Parameters
bufferIdsPointer to an array that will receive the buffer IDs.
numBuffersthe number of buffers to generate.
Returns
TRUE if the operation was successful.
+ (ALuint) genSource

Generate a source.

Returns
the source's ID.
+ (bool) genSources: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Generate sources.

Parameters
sourceIdsPointer to an array that will receive the source IDs.
numSourcesthe number of sources to generate.
Returns
TRUE if the operation was successful.
+ (bool) getBoolean: (ALenum)  parameter

Get a boolean parameter.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value.
+ (bool) getBooleanv: (ALenum)  parameter
values: (ALboolean*)  values 

Get a boolean array parameter.

Parameters
parameterThe parameter to fetch.
valuesAn array to hold the result.
Returns
TRUE if the operation was successful.
+ (bool) getBuffer3f: (ALuint)  bufferId
parameter: (ALenum)  parameter
v1: (ALfloat*)  v1
v2: (ALfloat*)  v2
v3: (ALfloat*)  v3 

Read a 3 float paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (bool) getBuffer3i: (ALuint)  bufferId
parameter: (ALenum)  parameter
v1: (ALint*)  v1
v2: (ALint*)  v2
v3: (ALint*)  v3 

Read a 3 integer paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (ALfloat) getBufferf: (ALuint)  bufferId
parameter: (ALenum)  parameter 

Read a float paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getBufferfv: (ALuint)  bufferId
parameter: (ALenum)  parameter
values: (ALfloat*)  values 

Read a float array paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (ALint) getBufferi: (ALuint)  bufferId
parameter: (ALenum)  parameter 

Read an integer paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getBufferiv: (ALuint)  bufferId
parameter: (ALenum)  parameter
values: (ALint*)  values 

Read an integer array paramter from a buffer.

Parameters
bufferIdThe buffer's ID.
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (ALCdevice *) getContextsDevice: (ALCcontext*)  context

Get the device a context was created from.

Parameters
contextThe context.
Returns
The context's device.
+ (ALCdevice *) getContextsDevice: (ALCcontext*)  context
deviceReference: (ALCdevice*)  deviceReference 

Get the device a context was created from, passing in a device reference for more informative logging info.

Parameters
contextThe context.
deviceReferenceThe device reference to use when logging an error.
Returns
The context's device.
+ (ALCcontext *) getCurrentContext

Get the current context.

Returns
the current context.
+ (ALdouble) getDouble: (ALenum)  parameter

Get a double parameter.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value.
+ (bool) getDoublev: (ALenum)  parameter
values: (ALdouble*)  values 

Get a double array parameter.

Parameters
parameterThe parameter to fetch.
valuesAn array to hold the result.
Returns
TRUE if the operation was successful.
+ (ALenum) getEnumValue: (NSString*)  enumName

Get the enum value from its name.

Parameters
enumNamethe name of the enum value.
Returns
The enum value.
+ (ALenum) getEnumValue: (ALCdevice*)  device
name: (NSString*)  enumName 

Get the enum value from its name.

Parameters
deviceThe device to check on.
enumNamethe name of the enum value.
Returns
The enum value.
+ (ALfloat) getFloat: (ALenum)  parameter

Get a float parameter.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value.
+ (bool) getFloatv: (ALenum)  parameter
values: (ALfloat*)  values 

Get a float array parameter.

Parameters
parameterThe parameter to fetch.
valuesAn array to hold the result.
Returns
TRUE if the operation was successful.
+ (ALint) getInteger: (ALenum)  parameter

Get an integer parameter.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value.
+ (ALint) getInteger: (ALCdevice*)  device
attribute: (ALenum)  attribute 

Get an integer attribute.

Parameters
deviceThe device to read the attribute from.
attributeThe attribute to fetch.
Returns
The parameter's current value.
+ (bool) getIntegerv: (ALCdevice*)  device
attribute: (ALenum)  attribute
size: (ALsizei)  size
data: (ALCint*)  data 

Get an integer array attribute.

Parameters
deviceThe device to read the attribute from.
attributeThe attribute to read.
sizethe size of the receiving array.
dataAn array to store the values.
Returns
TRUE if the operation was successful.
+ (bool) getIntegerv: (ALenum)  parameter
values: (ALint*)  values 

Get an integer array parameter.

Parameters
parameterThe parameter to fetch.
valuesAn array to hold the result.
Returns
TRUE if the operation was successful.
+ (bool) getListener3f: (ALenum)  parameter
v1: (ALfloat*)  v1
v2: (ALfloat*)  v2
v3: (ALfloat*)  v3 

Read a 3 float paramter from the current listener.

Parameters
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (bool) getListener3i: (ALenum)  parameter
v1: (ALint*)  v1
v2: (ALint*)  v2
v3: (ALint*)  v3 

Read a 3 integer paramter from the current listener.

Parameters
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (ALfloat) getListenerf: (ALenum)  parameter

Read a float paramter from the current listener.

Parameters
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getListenerfv: (ALenum)  parameter
values: (ALfloat*)  values 

Read a float array paramter from the current listener.

Parameters
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (ALint) getListeneri: (ALenum)  parameter

Read an integer paramter from the current listener.

Parameters
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getListeneriv: (ALenum)  parameter
values: (ALint*)  values 

Read an integer array paramter from the current listener.

Parameters
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (ALdouble) getMixerOutputDataRate

Get the iOS device's mixer outut data rate.

Returns
The mixer output data rate.
+ (NSArray *) getNullSeparatedStringList: (ALenum)  parameter

Get a string list parameter.

Use this method for OpenAL parameters that return a null separated list.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value (as an array of NSString*).
+ (NSArray *) getNullSeparatedStringList: (ALCdevice*)  device
attribute: (ALenum)  attribute 

Get a string list attribute.

Use this method for OpenAL attributes that return a null separated list.

Parameters
deviceThe device to read the attribute from.
attributeThe attribute to fetch.
Returns
The parameter's current value (as an array of NSString*).
+ (void *) getProcAddress: (NSString*)  functionName

Get the address of a procedure.

Parameters
functionNameThe name of the procedure to fetch.
Returns
A pointer to the procedure, or NULL if it wasn't found.
+ (void *) getProcAddress: (ALCdevice*)  device
name: (NSString*)  functionName 

Get the address of a procedure for a device.

Parameters
deviceThe device to check on.
functionNameThe name of the procedure to check for.
Returns
The procedure's address, or NULL if not found.
+ (ALint) getRenderingQuality

Get the rendering quality.

Returns
The current rendering quality.
+ (bool) getSource3f: (ALuint)  sourceId
parameter: (ALenum)  parameter
v1: (ALfloat*)  v1
v2: (ALfloat*)  v2
v3: (ALfloat*)  v3 

Read a 3 float paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (bool) getSource3i: (ALuint)  sourceId
parameter: (ALenum)  parameter
v1: (ALint*)  v1
v2: (ALint*)  v2
v3: (ALint*)  v3 

Read a 3 integer paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
v1The first value to read.
v2The second value to read.
v3The third value to read.
Returns
TRUE if the operation was successful.
+ (ALfloat) getSourcef: (ALuint)  sourceId
parameter: (ALenum)  parameter 

Read a float paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getSourcefv: (ALuint)  sourceId
parameter: (ALenum)  parameter
values: (ALfloat*)  values 

Read a float array paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (ALint) getSourcei: (ALuint)  sourceId
parameter: (ALenum)  parameter 

Read an integer paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
Returns
The parameter's value.
+ (bool) getSourceiv: (ALuint)  sourceId
parameter: (ALenum)  parameter
values: (ALint*)  values 

Read an integer array paramter from a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to read.
valuesAn array to store the values.
Returns
TRUE if the operation was successful.
+ (NSArray *) getSpaceSeparatedStringList: (ALenum)  parameter

Get a string list parameter.

Use this method for OpenAL parameters that return a space separated list.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value (as an array of NSString*).
+ (NSArray *) getSpaceSeparatedStringList: (ALCdevice*)  device
attribute: (ALenum)  attribute 

Get a string list attribute.

Use this method for OpenAL attributes that return a space separated list.

Parameters
deviceThe device to read the attribute from.
attributeThe attribute to fetch.
Returns
The parameter's current value (as an array of NSString*).
+ (NSString *) getString: (ALenum)  parameter

Get a string parameter.

Parameters
parameterThe parameter to fetch.
Returns
The parameter's current value.
+ (NSString *) getString: (ALCdevice*)  device
attribute: (ALenum)  attribute 

Get a string attribute.

Parameters
deviceThe device to read the attribute from.
attributeThe attribute to fetch.
Returns
The parameter's current value.
+ (bool) isBuffer: (ALuint)  bufferId

Check if the speified buffer exists.

Parameters
bufferIdThe ID of the buffer to query.
Returns
TRUE if the buffer exists.
+ (bool) isEnabled: (ALenum)  capability

Check if a capability is enabled.

Parameters
capabilityThe capability to check.
Returns
TRUE if the capability is enabled.
+ (bool) isExtensionPresent: (NSString*)  extensionName

Check if an extension is present.

Parameters
extensionNameThe name of the extension to check.
Returns
TRUE if the extension is present.
+ (bool) isExtensionPresent: (ALCdevice*)  device
name: (NSString*)  extensionName 

Check if an extension is present on a device.

Parameters
deviceThe device to check for an extension on.
extensionNameThe name of the extension to check for.
Returns
TRUE if the extension is present.
+ (bool) isSource: (ALuint)  sourceId

Check if the speified source exists.

Parameters
sourceIdThe ID of the source to query.
Returns
TRUE if the buffer exists.
+ (bool) listener3f: (ALenum)  parameter
v1: (ALfloat)  v1
v2: (ALfloat)  v2
v3: (ALfloat)  v3 

Write a 3 float paramter to the current listener.

Parameters
parameterthe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) listener3i: (ALenum)  parameter
v1: (ALint)  v1
v2: (ALint)  v2
v3: (ALint)  v3 

Write a 3 integer paramter to the current listener.

Parameters
parameterThe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) listenerf: (ALenum)  parameter
value: (ALfloat)  value 

Write a float paramter to the current listener.

Parameters
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) listenerfv: (ALenum)  parameter
values: (ALfloat*)  values 

Write a float array paramter to the current listener.

Parameters
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) listeneri: (ALenum)  parameter
value: (ALint)  value 

Write an integer paramter to the current listener.

Parameters
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) listeneriv: (ALenum)  parameter
values: (ALint*)  values 

Write an integer array paramter to the current listener.

Parameters
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) makeContextCurrent: (ALCcontext*)  context

Make the specified context the current context.

Parameters
contextthe context to make current.
Returns
TRUE if the operation was successful.
+ (bool) makeContextCurrent: (ALCcontext*)  context
deviceReference: (ALCdevice*)  deviceReference 

Make the specified context the current context, passing in a device reference for more informative logging info.

Parameters
contextThe context to make current.
deviceReferenceThe device reference to use when logging an error.
Returns
TRUE if the operation was successful.
+ (ALCdevice *) openCaptureDevice: (NSString*)  deviceName
frequency: (ALCuint)  frequency
format: (ALCenum)  format
bufferSize: (ALCsizei)  bufferSize 

UNSUPPORTED ON IOS Open an audio capture device.

Parameters
deviceNameThe name of the device to open (nil = open the default device).
frequencyThe sampling frequency to use.
formatThe format to capture the data as.
bufferSizeThe size of capture buffer to use.
Returns
The opened device, or nil if an error occurred.
+ (ALCdevice *) openDevice: (NSString*)  deviceName

Open a device.

Parameters
deviceNameThe name of the device to open (nil = open the default device).
Returns
The opened device, or nil on failure.
+ (void) processContext: (ALCcontext*)  context

Process a context.

Parameters
contextThe contect to process.
Returns
TRUE if the operation was successful.
+ (bool) removeNotification: (ALuint)  notificationID
onSource: (ALuint)  source
callback: (alSourceNotificationProc)  callback
userData: (void*)  userData 

Remove a notification callback from a source.

Parameters
notificationIDThe kind of notification (see addNotification).
sourceThe source ID.
callbackThe function to be unregistered.
userDatanot actually needed but part of the API.
Returns
TRUE if the operation was successful.
+ (bool) setMixerOutputDataRate: (ALdouble)  frequency

Set the iOS device's mixer output data rate.

Parameters
frequencyThe output data rate (frequency).
+ (bool) setRenderingQuality: (ALint)  quality

Set the rendering quality.

The value may be one of:

ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_HIGH ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_LOW ALC_IPHONE_SPATIAL_RENDERING_QUALITY_HEADPHONES (iOS only)

Parameters
qualityThe quality.
+ (bool) source3f: (ALuint)  sourceId
parameter: (ALenum)  parameter
v1: (ALfloat)  v1
v2: (ALfloat)  v2
v3: (ALfloat)  v3 

Write a 3 float paramter to a source.

Parameters
sourceIdThe source's ID.
parameterthe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) source3i: (ALuint)  sourceId
parameter: (ALenum)  parameter
v1: (ALint)  v1
v2: (ALint)  v2
v3: (ALint)  v3 

Write a 3 integer paramter to a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to write to.
v1The first value to write.
v2The second value to write.
v3The third value to write.
Returns
TRUE if the operation was successful.
+ (bool) sourcef: (ALuint)  sourceId
parameter: (ALenum)  parameter
value: (ALfloat)  value 

Write a float paramter to a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) sourcefv: (ALuint)  sourceId
parameter: (ALenum)  parameter
values: (ALfloat*)  values 

Write a float array paramter to a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) sourcei: (ALuint)  sourceId
parameter: (ALenum)  parameter
value: (ALint)  value 

Write an integer paramter to a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to write to.
valueThe value to write.
Returns
TRUE if the operation was successful.
+ (bool) sourceiv: (ALuint)  sourceId
parameter: (ALenum)  parameter
values: (ALint*)  values 

Write an integer array paramter to a source.

Parameters
sourceIdThe source's ID.
parameterThe parameter to write to.
valuesThe values to write.
Returns
TRUE if the operation was successful.
+ (bool) sourcePause: (ALuint)  sourceId

Pause a source.

Parameters
sourceIdThe ID of the source to pause.
Returns
TRUE if the operation is successful.
+ (bool) sourcePausev: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Pause a bunch of sources.

Parameters
sourceIdsThe sources to pause.
numSourcesThe number of sources in sourceIds.
Returns
TRUE if the operation is successful.
+ (bool) sourcePlay: (ALuint)  sourceId

Play a source.

Parameters
sourceIdThe ID of the source to play.
Returns
TRUE if the buffer exists.
+ (bool) sourcePlayv: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Play a bunch of sources.

Parameters
sourceIdsThe sources to play.
numSourcesThe number of sources in sourceIds.
Returns
TRUE if the operation is successful.
+ (bool) sourceQueueBuffers: (ALuint)  sourceId
numBuffers: (ALsizei)  numBuffers
bufferIds: (ALuint*)  bufferIds 

Queue buffers into a source for sequential playback.

Parameters
sourceIdThe source to use for playback.
numBuffersThe number of buffers to queue.
bufferIdsThe IDs of the buffers to queue.
Returns
TRUE if the operation is successful.
+ (bool) sourceRewind: (ALuint)  sourceId

Rewind a source.

Parameters
sourceIdThe ID of the source to rewind.
Returns
TRUE if the operation is successful.
+ (bool) sourceRewindv: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Rewind a bunch of sources.

Parameters
sourceIdsThe sources to rewind.
numSourcesThe number of sources in sourceIds.
Returns
TRUE if the operation is successful.
+ (bool) sourceStop: (ALuint)  sourceId

Stop a source.

Parameters
sourceIdThe ID of the source to stop.
Returns
TRUE if the operation is successful.
+ (bool) sourceStopv: (ALuint*)  sourceIds
numSources: (ALsizei)  numSources 

Stop a bunch of sources.

Parameters
sourceIdsThe sources to stop.
numSourcesThe number of sources in sourceIds.
Returns
TRUE if the operation is successful.
+ (bool) sourceUnqueueBuffers: (ALuint)  sourceId
numBuffers: (ALsizei)  numBuffers
bufferIds: (ALuint*)  bufferIds 

Unqueue previously queued buffers.

Parameters
sourceIdThe source the buffers were previously queued in.
numBuffersThe number of buffers to unqueue.
bufferIdsThe IDs of the buffers to unqueue.
Returns
TRUE if the operation is successful.
+ (bool) speedOfSound: (ALfloat)  value

Set the speed of sound.

Parameters
valueThe value to set.
Returns
TRUE if the operation was successful.
+ (bool) startCapture: (ALCdevice*)  device

Start capturing audio data.

Parameters
deviceThe device to capture on.
Returns
TRUE if the operation was successful.
+ (bool) stopCapture: (ALCdevice*)  device

Stop capturing audio data.

Parameters
deviceThe device capturing audio data.
Returns
TRUE if the operation was successful.
+ (void) suspendContext: (ALCcontext*)  context

Suspend a context.

Parameters
contextThe contect to suspend.
Returns
TRUE if the operation was successful.

The documentation for this class was generated from the following files: