ALWrapper Class Reference
Inherits from | NSObject |
Declared in | ALWrapper.h |
Overview
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.
Tasks
-
+ genBuffers:numBuffers:
Generate buffers.
-
+ genBuffer
Generate a buffer.
-
+ deleteBuffers:numBuffers:
Delete buffers.
-
+ deleteBuffer:
Delete a buffer.
-
+ isBuffer:
Check if the speified buffer exists.
-
+ bufferData:format:data:size:frequency:
Load data into a buffer.
-
+ bufferf:parameter:value:
Write a float paramter to a buffer.
-
+ buffer3f:parameter:v1:v2:v3:
Write a 3 float paramter to a buffer.
-
+ bufferfv:parameter:values:
Write a float array paramter to a buffer.
-
+ bufferi:parameter:value:
Write an integer paramter to a buffer.
-
+ buffer3i:parameter:v1:v2:v3:
Write a 3 integer paramter to a buffer.
-
+ bufferiv:parameter:values:
Write an integer array paramter to a buffer.
-
+ getBufferf:parameter:
Read a float paramter from a buffer.
-
+ getBuffer3f:parameter:v1:v2:v3:
Read a 3 float paramter from a buffer.
-
+ getBufferfv:parameter:values:
Read a float array paramter from a buffer.
-
+ getBufferi:parameter:
Read an integer paramter from a buffer.
-
+ getBuffer3i:parameter:v1:v2:v3:
Read a 3 integer paramter from a buffer.
-
+ getBufferiv:parameter:values:
Read an integer array paramter from a buffer.
-
+ genSources:numSources:
Generate sources.
-
+ genSource
Generate a source.
-
+ deleteSources:numSources:
Delete sources.
-
+ deleteSource:
Delete a source.
-
+ isSource:
Check if the speified source exists.
-
+ sourcePlay:
Play a source.
-
+ sourcePlayv:numSources:
Play a bunch of sources.
-
+ sourcePause:
Pause a source.
-
+ sourcePausev:numSources:
Pause a bunch of sources.
-
+ sourceStop:
Stop a source.
-
+ sourceStopv:numSources:
Stop a bunch of sources.
-
+ sourceRewind:
Rewind a source.
-
+ sourceRewindv:numSources:
Rewind a bunch of sources.
-
+ sourceQueueBuffers:numBuffers:bufferIds:
Queue buffers into a source for sequential playback.
-
+ sourceUnqueueBuffers:numBuffers:bufferIds:
Unqueue previously queued buffers.
-
+ sourcef:parameter:value:
Write a float paramter to a source.
-
+ source3f:parameter:v1:v2:v3:
Write a 3 float paramter to a source.
-
+ sourcefv:parameter:values:
Write a float array paramter to a source.
-
+ sourcei:parameter:value:
Write an integer paramter to a source.
-
+ source3i:parameter:v1:v2:v3:
Write a 3 integer paramter to a source.
-
+ sourceiv:parameter:values:
Write an integer array paramter to a source.
-
+ getSourcef:parameter:
Read a float paramter from a source.
-
+ getSource3f:parameter:v1:v2:v3:
Read a 3 float paramter from a source.
-
+ getSourcefv:parameter:values:
Read a float array paramter from a source.
-
+ getSourcei:parameter:
Read an integer paramter from a source.
-
+ getSource3i:parameter:v1:v2:v3:
Read a 3 integer paramter from a source.
-
+ getSourceiv:parameter:values:
Read an integer array paramter from a source.
-
+ listenerf:value:
Write a float paramter to the current listener.
-
+ listener3f:v1:v2:v3:
Write a 3 float paramter to the current listener.
-
+ listenerfv:values:
Write a float array paramter to the current listener.
-
+ listeneri:value:
Write an integer paramter to the current listener.
-
+ listener3i:v1:v2:v3:
Write a 3 integer paramter to the current listener.
-
+ listeneriv:values:
Write an integer array paramter to the current listener.
-
+ getListenerf:
Read a float paramter from the current listener.
-
+ getListener3f:v1:v2:v3:
Read a 3 float paramter from the current listener.
-
+ getListenerfv:values:
Read a float array paramter from the current listener.
-
+ getListeneri:
Read an integer paramter from the current listener.
-
+ getListener3i:v1:v2:v3:
Read a 3 integer paramter from the current listener.
-
+ getListeneriv:values:
Read an integer array paramter from the current listener.
-
+ enable:
Enable a capability.
-
+ disable:
Disable a capability.
-
+ isEnabled:
Check if a capability is enabled.
-
+ getBoolean:
Get a boolean parameter.
-
+ getDouble:
Get a double parameter.
-
+ getFloat:
Get a float parameter.
-
+ getInteger:
Get an integer parameter.
-
+ getString:
Get a string parameter.
-
+ getNullSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a null separated list.
-
+ getSpaceSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a space separated list.
-
+ getBooleanv:values:
Get a boolean array parameter.
-
+ getDoublev:values:
Get a double array parameter.
-
+ getFloatv:values:
Get a float array parameter.
-
+ getIntegerv:values:
Get an integer array parameter.
-
+ distanceModel:
Set the distance model.
-
+ dopplerFactor:
Set the doppler factor.
-
+ speedOfSound:
Set the speed of sound.
-
+ isExtensionPresent:
Check if an extension is present.
-
+ getProcAddress:
Get the address of a procedure.
-
+ getEnumValue:
Get the enum value from its name.
-
+ openDevice:
Open a device.
-
+ closeDevice:
Close a device.
-
+ createContext:attributes:
Create an OpenAL context.
-
+ makeContextCurrent:
Make the specified context the current context.
-
+ makeContextCurrent:deviceReference:
Make the specified context the current context, passing in a device reference for more informative logging info.
-
+ processContext:
Process a context.
-
+ suspendContext:
Suspend a context.
-
+ destroyContext:
Destroy a context.
-
+ getCurrentContext
Get the current context.
-
+ getContextsDevice:
Get the device a context was created from.
-
+ getContextsDevice:deviceReference:
Get the device a context was created from, passing in a device reference for more informative logging info.
-
+ isExtensionPresent:name:
Check if an extension is present on a device.
-
+ getProcAddress:name:
Get the address of a procedure for a device.
-
+ getEnumValue:name:
Get the enum value from its name.
-
+ getString:attribute:
Get a string attribute.
-
+ getNullSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a null separated list.
-
+ getSpaceSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a space separated list.
-
+ getInteger:attribute:
Get an integer attribute.
-
+ getIntegerv:attribute:size:data:
Get an integer array attribute.
-
+ openCaptureDevice:frequency:format:bufferSize:
UNSUPPORTED ON IOS* Open an audio capture device.
-
+ closeCaptureDevice:
Close a capture device.
-
+ startCapture:
Start capturing audio data.
-
+ stopCapture:
Stop capturing audio data.
-
+ captureSamples:buffer:numSamples:
Get captured samples from a device.
-
+ getMixerOutputDataRate
Get the iOS device’s mixer outut data rate.
-
+ setMixerOutputDataRate:
Set the iOS device’s mixer output data rate.
-
+ bufferDataStatic:format:data:size: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.
Class Methods
buffer3f:parameter:v1:v2:v3:
Write a 3 float paramter to a buffer.
+ (bool)buffer3f:(ALuint)bufferId parameter:(ALenum)parameter v1:(ALfloat)v1 v2:(ALfloat)v2 v3:(ALfloat)v3
Parameters
- bufferId
The buffer’s ID.
- parameter
the parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
buffer3i:parameter:v1:v2:v3:
Write a 3 integer paramter to a buffer.
+ (bool)buffer3i:(ALuint)bufferId parameter:(ALenum)parameter v1:(ALint)v1 v2:(ALint)v2 v3:(ALint)v3
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
bufferData:format:data:size:frequency:
Load data into a buffer.
+ (bool)bufferData:(ALuint)bufferId format:(ALenum)format data:(const ALvoid *)data size:(ALsizei)size frequency:(ALsizei)frequency
Parameters
- bufferId
The ID of the buffer to load data into.
- format
The format of the data being loaded (typically AL_FORMAT_MONO16 or AL_FORMAT_STEREO16).
- data
The audio data.
- size
The size of the data in bytes.
- frequency
The sample frequency of the data.
Declared In
ALWrapper.h
bufferDataStatic:format:data:size: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.
+ (bool)bufferDataStatic:(ALuint)bufferId format:(ALenum)format data:(const ALvoid *)data size:(ALsizei)size frequency:(ALsizei)frequency
Parameters
- bufferId
The ID of the buffer to load data into.
- format
The format of the data being loaded (typically AL_FORMAT_MONO16 or AL_FORMAT_STEREO16).
- data
The audio data.
- size
The size of the data in bytes.
- frequency
The sample frequency of the data.
Declared In
ALWrapper.h
bufferf:parameter:value:
Write a float paramter to a buffer.
+ (bool)bufferf:(ALuint)bufferId parameter:(ALenum)parameter value:(ALfloat)value
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
bufferfv:parameter:values:
Write a float array paramter to a buffer.
+ (bool)bufferfv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALfloat *)values
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
bufferi:parameter:value:
Write an integer paramter to a buffer.
+ (bool)bufferi:(ALuint)bufferId parameter:(ALenum)parameter value:(ALint)value
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
bufferiv:parameter:values:
Write an integer array paramter to a buffer.
+ (bool)bufferiv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALint *)values
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
captureSamples:buffer:numSamples:
Get captured samples from a device.
+ (bool)captureSamples:(ALCdevice *)device buffer:(ALCvoid *)buffer numSamples:(ALCsizei)numSamples
Parameters
- device
the device to fetch samples from.
- buffer
the buffer to copy the samples into.
- numSamples
the number of samples to fetch.
Declared In
ALWrapper.h
closeCaptureDevice:
Close a capture device.
+ (bool)closeCaptureDevice:(ALCdevice *)device
Parameters
- device
The device to close.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
closeDevice:
Close a device.
+ (bool)closeDevice:(ALCdevice *)device
Parameters
- device
The device to close.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
createContext:attributes:
Create an OpenAL context.
+ (ALCcontext *)createContext:(ALCdevice *)device attributes:(ALCint *)attributes
Parameters
- device
The device to open the context on.
- attributes
The attributes to use when creating the context.
Return Value
The new context.
Declared In
ALWrapper.h
deleteBuffer:
Delete a buffer.
+ (bool)deleteBuffer:(ALuint)bufferId
Parameters
- bufferId
The ID of the buffer to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
deleteBuffers:numBuffers:
Delete buffers.
+ (bool)deleteBuffers:(ALuint *)bufferIds numBuffers:(ALsizei)numBuffers
Parameters
- bufferIds
Pointer to an array containing the buffer IDs.
- numBuffers
the number of buffers to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
deleteSource:
Delete a source.
+ (bool)deleteSource:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
deleteSources:numSources:
Delete sources.
+ (bool)deleteSources:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
Pointer to an array containing the source IDs.
- numSources
the number of sources to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
destroyContext:
Destroy a context.
+ (void)destroyContext:(ALCcontext *)context
Parameters
- context
The contect to destroy.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
disable:
Disable a capability.
+ (bool)disable:(ALenum)capability
Parameters
- capability
The capability to disable.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
distanceModel:
Set the distance model.
+ (bool)distanceModel:(ALenum)value
Parameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
dopplerFactor:
Set the doppler factor.
+ (bool)dopplerFactor:(ALfloat)value
Parameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
enable:
Enable a capability.
+ (bool)enable:(ALenum)capability
Parameters
- capability
The capability to enable.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
genBuffer
Generate a buffer.
+ (ALuint)genBuffer
Return Value
the buffer’s ID.
Declared In
ALWrapper.h
genBuffers:numBuffers:
Generate buffers.
+ (bool)genBuffers:(ALuint *)bufferIds numBuffers:(ALsizei)numBuffers
Parameters
- bufferIds
Pointer to an array that will receive the buffer IDs.
- numBuffers
the number of buffers to generate.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
genSource
Generate a source.
+ (ALuint)genSource
Return Value
the source’s ID.
Declared In
ALWrapper.h
genSources:numSources:
Generate sources.
+ (bool)genSources:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
Pointer to an array that will receive the source IDs.
- numSources
the number of sources to generate.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getBoolean:
Get a boolean parameter.
+ (bool)getBoolean:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getBooleanv:values:
Get a boolean array parameter.
+ (bool)getBooleanv:(ALenum)parameter values:(ALboolean *)values
Parameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getBuffer3f:parameter:v1:v2:v3:
Read a 3 float paramter from a buffer.
+ (bool)getBuffer3f:(ALuint)bufferId parameter:(ALenum)parameter v1:(ALfloat *)v1 v2:(ALfloat *)v2 v3:(ALfloat *)v3
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getBuffer3i:parameter:v1:v2:v3:
Read a 3 integer paramter from a buffer.
+ (bool)getBuffer3i:(ALuint)bufferId parameter:(ALenum)parameter v1:(ALint *)v1 v2:(ALint *)v2 v3:(ALint *)v3
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getBufferf:parameter:
Read a float paramter from a buffer.
+ (ALfloat)getBufferf:(ALuint)bufferId parameter:(ALenum)parameter
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getBufferfv:parameter:values:
Read a float array paramter from a buffer.
+ (bool)getBufferfv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALfloat *)values
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getBufferi:parameter:
Read an integer paramter from a buffer.
+ (ALint)getBufferi:(ALuint)bufferId parameter:(ALenum)parameter
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getBufferiv:parameter:values:
Read an integer array paramter from a buffer.
+ (bool)getBufferiv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALint *)values
Parameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getContextsDevice:
Get the device a context was created from.
+ (ALCdevice *)getContextsDevice:(ALCcontext *)context
Parameters
- context
The context.
Return Value
The context’s device.
Declared In
ALWrapper.h
getContextsDevice:deviceReference:
Get the device a context was created from, passing in a device reference for more informative logging info.
+ (ALCdevice *)getContextsDevice:(ALCcontext *)context deviceReference:(ALCdevice *)deviceReference
Parameters
- context
The context.
- deviceReference
The device reference to use when logging an error.
Return Value
The context’s device.
Declared In
ALWrapper.h
getCurrentContext
Get the current context.
+ (ALCcontext *)getCurrentContext
Return Value
the current context.
Declared In
ALWrapper.h
getDouble:
Get a double parameter.
+ (ALdouble)getDouble:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getDoublev:values:
Get a double array parameter.
+ (bool)getDoublev:(ALenum)parameter values:(ALdouble *)values
Parameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getEnumValue:
Get the enum value from its name.
+ (ALenum)getEnumValue:(NSString *)enumName
Parameters
- enumName
the name of the enum value.
Return Value
The enum value.
Declared In
ALWrapper.h
getEnumValue:name:
Get the enum value from its name.
+ (ALenum)getEnumValue:(ALCdevice *)device name:(NSString *)enumName
Parameters
- device
The device to check on.
- enumName
the name of the enum value.
Return Value
The enum value.
Declared In
ALWrapper.h
getFloat:
Get a float parameter.
+ (ALfloat)getFloat:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getFloatv:values:
Get a float array parameter.
+ (bool)getFloatv:(ALenum)parameter values:(ALfloat *)values
Parameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getInteger:
Get an integer parameter.
+ (ALint)getInteger:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getInteger:attribute:
Get an integer attribute.
+ (ALint)getInteger:(ALCdevice *)device attribute:(ALenum)attribute
Parameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getIntegerv:attribute:size:data:
Get an integer array attribute.
+ (bool)getIntegerv:(ALCdevice *)device attribute:(ALenum)attribute size:(ALsizei)size data:(ALCint *)data
Parameters
- device
The device to read the attribute from.
- attribute
The attribute to read.
- size
the size of the receiving array.
- data
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getIntegerv:values:
Get an integer array parameter.
+ (bool)getIntegerv:(ALenum)parameter values:(ALint *)values
Parameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getListener3f:v1:v2:v3:
Read a 3 float paramter from the current listener.
+ (bool)getListener3f:(ALenum)parameter v1:(ALfloat *)v1 v2:(ALfloat *)v2 v3:(ALfloat *)v3
Parameters
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getListener3i:v1:v2:v3:
Read a 3 integer paramter from the current listener.
+ (bool)getListener3i:(ALenum)parameter v1:(ALint *)v1 v2:(ALint *)v2 v3:(ALint *)v3
Parameters
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getListenerf:
Read a float paramter from the current listener.
+ (ALfloat)getListenerf:(ALenum)parameter
Parameters
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getListenerfv:values:
Read a float array paramter from the current listener.
+ (bool)getListenerfv:(ALenum)parameter values:(ALfloat *)values
Parameters
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getListeneri:
Read an integer paramter from the current listener.
+ (ALint)getListeneri:(ALenum)parameter
Parameters
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getListeneriv:values:
Read an integer array paramter from the current listener.
+ (bool)getListeneriv:(ALenum)parameter values:(ALint *)values
Parameters
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getMixerOutputDataRate
Get the iOS device’s mixer outut data rate.
+ (ALdouble)getMixerOutputDataRate
Return Value
The mixer output data rate.
Declared In
ALWrapper.h
getNullSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a null separated list.
+ (NSArray *)getNullSeparatedStringList:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.h
getNullSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a null separated list.
+ (NSArray *)getNullSeparatedStringList:(ALCdevice *)device attribute:(ALenum)attribute
Parameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.h
getProcAddress:
Get the address of a procedure.
+ (void *)getProcAddress:(NSString *)functionName
Parameters
- functionName
The name of the procedure to fetch.
Return Value
A pointer to the procedure, or NULL if it wasn’t found.
Declared In
ALWrapper.h
getProcAddress:name:
Get the address of a procedure for a device.
+ (void *)getProcAddress:(ALCdevice *)device name:(NSString *)functionName
Parameters
- device
The device to check on.
- functionName
The name of the procedure to check for.
Return Value
The procedure’s address, or NULL if not found.
Declared In
ALWrapper.h
getSource3f:parameter:v1:v2:v3:
Read a 3 float paramter from a source.
+ (bool)getSource3f:(ALuint)sourceId parameter:(ALenum)parameter v1:(ALfloat *)v1 v2:(ALfloat *)v2 v3:(ALfloat *)v3
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getSource3i:parameter:v1:v2:v3:
Read a 3 integer paramter from a source.
+ (bool)getSource3i:(ALuint)sourceId parameter:(ALenum)parameter v1:(ALint *)v1 v2:(ALint *)v2 v3:(ALint *)v3
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
- v1
The first value to read.
- v2
The second value to read.
- v3
The third value to read.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getSourcef:parameter:
Read a float paramter from a source.
+ (ALfloat)getSourcef:(ALuint)sourceId parameter:(ALenum)parameter
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getSourcefv:parameter:values:
Read a float array paramter from a source.
+ (bool)getSourcefv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALfloat *)values
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getSourcei:parameter:
Read an integer paramter from a source.
+ (ALint)getSourcei:(ALuint)sourceId parameter:(ALenum)parameter
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.h
getSourceiv:parameter:values:
Read an integer array paramter from a source.
+ (bool)getSourceiv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALint *)values
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
getSpaceSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a space separated list.
+ (NSArray *)getSpaceSeparatedStringList:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.h
getSpaceSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a space separated list.
+ (NSArray *)getSpaceSeparatedStringList:(ALCdevice *)device attribute:(ALenum)attribute
Parameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.h
getString:
Get a string parameter.
+ (NSString *)getString:(ALenum)parameter
Parameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
getString:attribute:
Get a string attribute.
+ (NSString *)getString:(ALCdevice *)device attribute:(ALenum)attribute
Parameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.h
isBuffer:
Check if the speified buffer exists.
+ (bool)isBuffer:(ALuint)bufferId
Parameters
- bufferId
The ID of the buffer to query.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.h
isEnabled:
Check if a capability is enabled.
+ (bool)isEnabled:(ALenum)capability
Parameters
- capability
The capability to check.
Return Value
TRUE if the capability is enabled.
Declared In
ALWrapper.h
isExtensionPresent:
Check if an extension is present.
+ (bool)isExtensionPresent:(NSString *)extensionName
Parameters
- extensionName
The name of the extension to check.
Return Value
TRUE if the extension is present.
Declared In
ALWrapper.h
isExtensionPresent:name:
Check if an extension is present on a device.
+ (bool)isExtensionPresent:(ALCdevice *)device name:(NSString *)extensionName
Parameters
- device
The device to check for an extension on.
- extensionName
The name of the extension to check for.
Return Value
TRUE if the extension is present.
Declared In
ALWrapper.h
isSource:
Check if the speified source exists.
+ (bool)isSource:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to query.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.h
listener3f:v1:v2:v3:
Write a 3 float paramter to the current listener.
+ (bool)listener3f:(ALenum)parameter v1:(ALfloat)v1 v2:(ALfloat)v2 v3:(ALfloat)v3
Parameters
- parameter
the parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
listener3i:v1:v2:v3:
Write a 3 integer paramter to the current listener.
+ (bool)listener3i:(ALenum)parameter v1:(ALint)v1 v2:(ALint)v2 v3:(ALint)v3
Parameters
- parameter
The parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
listenerf:value:
Write a float paramter to the current listener.
+ (bool)listenerf:(ALenum)parameter value:(ALfloat)value
Parameters
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
listenerfv:values:
Write a float array paramter to the current listener.
+ (bool)listenerfv:(ALenum)parameter values:(ALfloat *)values
Parameters
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
listeneri:value:
Write an integer paramter to the current listener.
+ (bool)listeneri:(ALenum)parameter value:(ALint)value
Parameters
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
listeneriv:values:
Write an integer array paramter to the current listener.
+ (bool)listeneriv:(ALenum)parameter values:(ALint *)values
Parameters
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
makeContextCurrent:
Make the specified context the current context.
+ (bool)makeContextCurrent:(ALCcontext *)context
Parameters
- context
the context to make current.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
makeContextCurrent:deviceReference:
Make the specified context the current context, passing in a device reference for more informative logging info.
+ (bool)makeContextCurrent:(ALCcontext *)context deviceReference:(ALCdevice *)deviceReference
Parameters
- context
The context to make current.
- deviceReference
The device reference to use when logging an error.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
openCaptureDevice:frequency:format:bufferSize:
UNSUPPORTED ON IOS* Open an audio capture device.
+ (ALCdevice *)openCaptureDevice:(NSString *)deviceName frequency:(ALCuint)frequency format:(ALCenum)format bufferSize:(ALCsizei)bufferSize
Parameters
- deviceName
The name of the device to open (nil = open the default device).
- frequency
The sampling frequency to use.
- format
The format to capture the data as.
- bufferSize
The size of capture buffer to use.
Return Value
The opened device, or nil if an error occurred.
Declared In
ALWrapper.h
openDevice:
Open a device.
+ (ALCdevice *)openDevice:(NSString *)deviceName
Parameters
- deviceName
The name of the device to open (nil = open the default device).
Return Value
The opened device, or nil on failure.
Declared In
ALWrapper.h
processContext:
Process a context.
+ (void)processContext:(ALCcontext *)context
Parameters
- context
The contect to process.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
setMixerOutputDataRate:
Set the iOS device’s mixer output data rate.
+ (void)setMixerOutputDataRate:(ALdouble)frequency
Parameters
- frequency
The output data rate (frequency).
Declared In
ALWrapper.h
source3f:parameter:v1:v2:v3:
Write a 3 float paramter to a source.
+ (bool)source3f:(ALuint)sourceId parameter:(ALenum)parameter v1:(ALfloat)v1 v2:(ALfloat)v2 v3:(ALfloat)v3
Parameters
- sourceId
The source’s ID.
- parameter
the parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
source3i:parameter:v1:v2:v3:
Write a 3 integer paramter to a source.
+ (bool)source3i:(ALuint)sourceId parameter:(ALenum)parameter v1:(ALint)v1 v2:(ALint)v2 v3:(ALint)v3
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to write to.
- v1
The first value to write.
- v2
The second value to write.
- v3
The third value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
sourcePause:
Pause a source.
+ (bool)sourcePause:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to pause.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourcePausev:numSources:
Pause a bunch of sources.
+ (bool)sourcePausev:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
The sources to pause.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourcePlay:
Play a source.
+ (bool)sourcePlay:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to play.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.h
sourcePlayv:numSources:
Play a bunch of sources.
+ (bool)sourcePlayv:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
The sources to play.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceQueueBuffers:numBuffers:bufferIds:
Queue buffers into a source for sequential playback.
+ (bool)sourceQueueBuffers:(ALuint)sourceId numBuffers:(ALsizei)numBuffers bufferIds:(ALuint *)bufferIds
Parameters
- sourceId
The source to use for playback.
- numBuffers
The number of buffers to queue.
- bufferIds
The IDs of the buffers to queue.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceRewind:
Rewind a source.
+ (bool)sourceRewind:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to rewind.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceRewindv:numSources:
Rewind a bunch of sources.
+ (bool)sourceRewindv:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
The sources to rewind.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceStop:
Stop a source.
+ (bool)sourceStop:(ALuint)sourceId
Parameters
- sourceId
The ID of the source to stop.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceStopv:numSources:
Stop a bunch of sources.
+ (bool)sourceStopv:(ALuint *)sourceIds numSources:(ALsizei)numSources
Parameters
- sourceIds
The sources to stop.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourceUnqueueBuffers:numBuffers:bufferIds:
Unqueue previously queued buffers.
+ (bool)sourceUnqueueBuffers:(ALuint)sourceId numBuffers:(ALsizei)numBuffers bufferIds:(ALuint *)bufferIds
Parameters
- sourceId
The source the buffers were previously queued in.
- numBuffers
The number of buffers to unqueue.
- bufferIds
The IDs of the buffers to unqueue.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.h
sourcef:parameter:value:
Write a float paramter to a source.
+ (bool)sourcef:(ALuint)sourceId parameter:(ALenum)parameter value:(ALfloat)value
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
sourcefv:parameter:values:
Write a float array paramter to a source.
+ (bool)sourcefv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALfloat *)values
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
sourcei:parameter:value:
Write an integer paramter to a source.
+ (bool)sourcei:(ALuint)sourceId parameter:(ALenum)parameter value:(ALint)value
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
sourceiv:parameter:values:
Write an integer array paramter to a source.
+ (bool)sourceiv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALint *)values
Parameters
- sourceId
The source’s ID.
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
speedOfSound:
Set the speed of sound.
+ (bool)speedOfSound:(ALfloat)value
Parameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h
startCapture:
Start capturing audio data.
+ (bool)startCapture:(ALCdevice *)device
Parameters
- device
The device to capture on.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h