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.
-
+ genBufferGenerate 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.
-
+ genSourceGenerate 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.
-
+ getCurrentContextGet 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.
-
+ getMixerOutputDataRateGet 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)v3Parameters
- 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.hbuffer3i: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)v3Parameters
- 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.hbufferData: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)frequencyParameters
- 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.hbufferDataStatic: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)frequencyParameters
- 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.hbufferf:parameter:value:
Write a float paramter to a buffer.
+ (bool)bufferf:(ALuint)bufferId parameter:(ALenum)parameter value:(ALfloat)valueParameters
- 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.hbufferfv:parameter:values:
Write a float array paramter to a buffer.
+ (bool)bufferfv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALfloat *)valuesParameters
- 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.hbufferi:parameter:value:
Write an integer paramter to a buffer.
+ (bool)bufferi:(ALuint)bufferId parameter:(ALenum)parameter value:(ALint)valueParameters
- 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.hbufferiv:parameter:values:
Write an integer array paramter to a buffer.
+ (bool)bufferiv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALint *)valuesParameters
- 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.hcaptureSamples:buffer:numSamples:
Get captured samples from a device.
+ (bool)captureSamples:(ALCdevice *)device buffer:(ALCvoid *)buffer numSamples:(ALCsizei)numSamplesParameters
- 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.hcloseCaptureDevice:
Close a capture device.
+ (bool)closeCaptureDevice:(ALCdevice *)deviceParameters
- device
The device to close.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hcloseDevice:
Close a device.
+ (bool)closeDevice:(ALCdevice *)deviceParameters
- device
The device to close.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hcreateContext:attributes:
Create an OpenAL context.
+ (ALCcontext *)createContext:(ALCdevice *)device attributes:(ALCint *)attributesParameters
- 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.hdeleteBuffer:
Delete a buffer.
+ (bool)deleteBuffer:(ALuint)bufferIdParameters
- bufferId
The ID of the buffer to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hdeleteBuffers:numBuffers:
Delete buffers.
+ (bool)deleteBuffers:(ALuint *)bufferIds numBuffers:(ALsizei)numBuffersParameters
- 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.hdeleteSource:
Delete a source.
+ (bool)deleteSource:(ALuint)sourceIdParameters
- sourceId
The ID of the source to delete.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hdeleteSources:numSources:
Delete sources.
+ (bool)deleteSources:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- 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.hdestroyContext:
Destroy a context.
+ (void)destroyContext:(ALCcontext *)contextParameters
- context
The contect to destroy.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hdisable:
Disable a capability.
+ (bool)disable:(ALenum)capabilityParameters
- capability
The capability to disable.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hdistanceModel:
Set the distance model.
+ (bool)distanceModel:(ALenum)valueParameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hdopplerFactor:
Set the doppler factor.
+ (bool)dopplerFactor:(ALfloat)valueParameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.henable:
Enable a capability.
+ (bool)enable:(ALenum)capabilityParameters
- capability
The capability to enable.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgenBuffer
Generate a buffer.
+ (ALuint)genBufferReturn Value
the buffer’s ID.
Declared In
ALWrapper.hgenBuffers:numBuffers:
Generate buffers.
+ (bool)genBuffers:(ALuint *)bufferIds numBuffers:(ALsizei)numBuffersParameters
- 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.hgenSource
Generate a source.
+ (ALuint)genSourceReturn Value
the source’s ID.
Declared In
ALWrapper.hgenSources:numSources:
Generate sources.
+ (bool)genSources:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- 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.hgetBoolean:
Get a boolean parameter.
+ (bool)getBoolean:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetBooleanv:values:
Get a boolean array parameter.
+ (bool)getBooleanv:(ALenum)parameter values:(ALboolean *)valuesParameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetBuffer3f: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 *)v3Parameters
- 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.hgetBuffer3i: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 *)v3Parameters
- 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.hgetBufferf:parameter:
Read a float paramter from a buffer.
+ (ALfloat)getBufferf:(ALuint)bufferId parameter:(ALenum)parameterParameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetBufferfv:parameter:values:
Read a float array paramter from a buffer.
+ (bool)getBufferfv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALfloat *)valuesParameters
- 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.hgetBufferi:parameter:
Read an integer paramter from a buffer.
+ (ALint)getBufferi:(ALuint)bufferId parameter:(ALenum)parameterParameters
- bufferId
The buffer’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetBufferiv:parameter:values:
Read an integer array paramter from a buffer.
+ (bool)getBufferiv:(ALuint)bufferId parameter:(ALenum)parameter values:(ALint *)valuesParameters
- 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.hgetContextsDevice:
Get the device a context was created from.
+ (ALCdevice *)getContextsDevice:(ALCcontext *)contextParameters
- context
The context.
Return Value
The context’s device.
Declared In
ALWrapper.hgetContextsDevice: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 *)deviceReferenceParameters
- context
The context.
- deviceReference
The device reference to use when logging an error.
Return Value
The context’s device.
Declared In
ALWrapper.hgetCurrentContext
Get the current context.
+ (ALCcontext *)getCurrentContextReturn Value
the current context.
Declared In
ALWrapper.hgetDouble:
Get a double parameter.
+ (ALdouble)getDouble:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetDoublev:values:
Get a double array parameter.
+ (bool)getDoublev:(ALenum)parameter values:(ALdouble *)valuesParameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetEnumValue:
Get the enum value from its name.
+ (ALenum)getEnumValue:(NSString *)enumNameParameters
- enumName
the name of the enum value.
Return Value
The enum value.
Declared In
ALWrapper.hgetEnumValue:name:
Get the enum value from its name.
+ (ALenum)getEnumValue:(ALCdevice *)device name:(NSString *)enumNameParameters
- device
The device to check on.
- enumName
the name of the enum value.
Return Value
The enum value.
Declared In
ALWrapper.hgetFloat:
Get a float parameter.
+ (ALfloat)getFloat:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetFloatv:values:
Get a float array parameter.
+ (bool)getFloatv:(ALenum)parameter values:(ALfloat *)valuesParameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetInteger:
Get an integer parameter.
+ (ALint)getInteger:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetInteger:attribute:
Get an integer attribute.
+ (ALint)getInteger:(ALCdevice *)device attribute:(ALenum)attributeParameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetIntegerv:attribute:size:data:
Get an integer array attribute.
+ (bool)getIntegerv:(ALCdevice *)device attribute:(ALenum)attribute size:(ALsizei)size data:(ALCint *)dataParameters
- 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.hgetIntegerv:values:
Get an integer array parameter.
+ (bool)getIntegerv:(ALenum)parameter values:(ALint *)valuesParameters
- parameter
The parameter to fetch.
- values
An array to hold the result.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetListener3f:v1:v2:v3:
Read a 3 float paramter from the current listener.
+ (bool)getListener3f:(ALenum)parameter v1:(ALfloat *)v1 v2:(ALfloat *)v2 v3:(ALfloat *)v3Parameters
- 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.hgetListener3i:v1:v2:v3:
Read a 3 integer paramter from the current listener.
+ (bool)getListener3i:(ALenum)parameter v1:(ALint *)v1 v2:(ALint *)v2 v3:(ALint *)v3Parameters
- 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.hgetListenerf:
Read a float paramter from the current listener.
+ (ALfloat)getListenerf:(ALenum)parameterParameters
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetListenerfv:values:
Read a float array paramter from the current listener.
+ (bool)getListenerfv:(ALenum)parameter values:(ALfloat *)valuesParameters
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetListeneri:
Read an integer paramter from the current listener.
+ (ALint)getListeneri:(ALenum)parameterParameters
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetListeneriv:values:
Read an integer array paramter from the current listener.
+ (bool)getListeneriv:(ALenum)parameter values:(ALint *)valuesParameters
- parameter
The parameter to read.
- values
An array to store the values.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hgetMixerOutputDataRate
Get the iOS device’s mixer outut data rate.
+ (ALdouble)getMixerOutputDataRateReturn Value
The mixer output data rate.
Declared In
ALWrapper.hgetNullSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a null separated list.
+ (NSArray *)getNullSeparatedStringList:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.hgetNullSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a null separated list.
+ (NSArray *)getNullSeparatedStringList:(ALCdevice *)device attribute:(ALenum)attributeParameters
- 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.hgetProcAddress:
Get the address of a procedure.
+ (void *)getProcAddress:(NSString *)functionNameParameters
- 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.hgetProcAddress:name:
Get the address of a procedure for a device.
+ (void *)getProcAddress:(ALCdevice *)device name:(NSString *)functionNameParameters
- 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.hgetSource3f: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 *)v3Parameters
- 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.hgetSource3i: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 *)v3Parameters
- 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.hgetSourcef:parameter:
Read a float paramter from a source.
+ (ALfloat)getSourcef:(ALuint)sourceId parameter:(ALenum)parameterParameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetSourcefv:parameter:values:
Read a float array paramter from a source.
+ (bool)getSourcefv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALfloat *)valuesParameters
- 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.hgetSourcei:parameter:
Read an integer paramter from a source.
+ (ALint)getSourcei:(ALuint)sourceId parameter:(ALenum)parameterParameters
- sourceId
The source’s ID.
- parameter
The parameter to read.
Return Value
The parameter’s value.
Declared In
ALWrapper.hgetSourceiv:parameter:values:
Read an integer array paramter from a source.
+ (bool)getSourceiv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALint *)valuesParameters
- 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.hgetSpaceSeparatedStringList:
Get a string list parameter. Use this method for OpenAL parameters that return a space separated list.
+ (NSArray *)getSpaceSeparatedStringList:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value (as an array of NSString*).
Declared In
ALWrapper.hgetSpaceSeparatedStringList:attribute:
Get a string list attribute. Use this method for OpenAL attributes that return a space separated list.
+ (NSArray *)getSpaceSeparatedStringList:(ALCdevice *)device attribute:(ALenum)attributeParameters
- 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.hgetString:
Get a string parameter.
+ (NSString *)getString:(ALenum)parameterParameters
- parameter
The parameter to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hgetString:attribute:
Get a string attribute.
+ (NSString *)getString:(ALCdevice *)device attribute:(ALenum)attributeParameters
- device
The device to read the attribute from.
- attribute
The attribute to fetch.
Return Value
The parameter’s current value.
Declared In
ALWrapper.hisBuffer:
Check if the speified buffer exists.
+ (bool)isBuffer:(ALuint)bufferIdParameters
- bufferId
The ID of the buffer to query.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.hisEnabled:
Check if a capability is enabled.
+ (bool)isEnabled:(ALenum)capabilityParameters
- capability
The capability to check.
Return Value
TRUE if the capability is enabled.
Declared In
ALWrapper.hisExtensionPresent:
Check if an extension is present.
+ (bool)isExtensionPresent:(NSString *)extensionNameParameters
- extensionName
The name of the extension to check.
Return Value
TRUE if the extension is present.
Declared In
ALWrapper.hisExtensionPresent:name:
Check if an extension is present on a device.
+ (bool)isExtensionPresent:(ALCdevice *)device name:(NSString *)extensionNameParameters
- 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.hisSource:
Check if the speified source exists.
+ (bool)isSource:(ALuint)sourceIdParameters
- sourceId
The ID of the source to query.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.hlistener3f:v1:v2:v3:
Write a 3 float paramter to the current listener.
+ (bool)listener3f:(ALenum)parameter v1:(ALfloat)v1 v2:(ALfloat)v2 v3:(ALfloat)v3Parameters
- 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.hlistener3i:v1:v2:v3:
Write a 3 integer paramter to the current listener.
+ (bool)listener3i:(ALenum)parameter v1:(ALint)v1 v2:(ALint)v2 v3:(ALint)v3Parameters
- 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.hlistenerf:value:
Write a float paramter to the current listener.
+ (bool)listenerf:(ALenum)parameter value:(ALfloat)valueParameters
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hlistenerfv:values:
Write a float array paramter to the current listener.
+ (bool)listenerfv:(ALenum)parameter values:(ALfloat *)valuesParameters
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hlisteneri:value:
Write an integer paramter to the current listener.
+ (bool)listeneri:(ALenum)parameter value:(ALint)valueParameters
- parameter
The parameter to write to.
- value
The value to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hlisteneriv:values:
Write an integer array paramter to the current listener.
+ (bool)listeneriv:(ALenum)parameter values:(ALint *)valuesParameters
- parameter
The parameter to write to.
- values
The values to write.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hmakeContextCurrent:
Make the specified context the current context.
+ (bool)makeContextCurrent:(ALCcontext *)contextParameters
- context
the context to make current.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hmakeContextCurrent:deviceReference:
Make the specified context the current context, passing in a device reference for more informative logging info.
+ (bool)makeContextCurrent:(ALCcontext *)context deviceReference:(ALCdevice *)deviceReferenceParameters
- 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.hopenCaptureDevice:frequency:format:bufferSize:
UNSUPPORTED ON IOS* Open an audio capture device.
+ (ALCdevice *)openCaptureDevice:(NSString *)deviceName frequency:(ALCuint)frequency format:(ALCenum)format bufferSize:(ALCsizei)bufferSizeParameters
- 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.hopenDevice:
Open a device.
+ (ALCdevice *)openDevice:(NSString *)deviceNameParameters
- 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.hprocessContext:
Process a context.
+ (void)processContext:(ALCcontext *)contextParameters
- context
The contect to process.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hsetMixerOutputDataRate:
Set the iOS device’s mixer output data rate.
+ (void)setMixerOutputDataRate:(ALdouble)frequencyParameters
- frequency
The output data rate (frequency).
Declared In
ALWrapper.hsource3f: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)v3Parameters
- 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.hsource3i: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)v3Parameters
- 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.hsourcePause:
Pause a source.
+ (bool)sourcePause:(ALuint)sourceIdParameters
- sourceId
The ID of the source to pause.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourcePausev:numSources:
Pause a bunch of sources.
+ (bool)sourcePausev:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- sourceIds
The sources to pause.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourcePlay:
Play a source.
+ (bool)sourcePlay:(ALuint)sourceIdParameters
- sourceId
The ID of the source to play.
Return Value
TRUE if the buffer exists.
Declared In
ALWrapper.hsourcePlayv:numSources:
Play a bunch of sources.
+ (bool)sourcePlayv:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- sourceIds
The sources to play.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourceQueueBuffers:numBuffers:bufferIds:
Queue buffers into a source for sequential playback.
+ (bool)sourceQueueBuffers:(ALuint)sourceId numBuffers:(ALsizei)numBuffers bufferIds:(ALuint *)bufferIdsParameters
- 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.hsourceRewind:
Rewind a source.
+ (bool)sourceRewind:(ALuint)sourceIdParameters
- sourceId
The ID of the source to rewind.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourceRewindv:numSources:
Rewind a bunch of sources.
+ (bool)sourceRewindv:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- sourceIds
The sources to rewind.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourceStop:
Stop a source.
+ (bool)sourceStop:(ALuint)sourceIdParameters
- sourceId
The ID of the source to stop.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourceStopv:numSources:
Stop a bunch of sources.
+ (bool)sourceStopv:(ALuint *)sourceIds numSources:(ALsizei)numSourcesParameters
- sourceIds
The sources to stop.
- numSources
The number of sources in sourceIds.
Return Value
TRUE if the operation is successful.
Declared In
ALWrapper.hsourceUnqueueBuffers:numBuffers:bufferIds:
Unqueue previously queued buffers.
+ (bool)sourceUnqueueBuffers:(ALuint)sourceId numBuffers:(ALsizei)numBuffers bufferIds:(ALuint *)bufferIdsParameters
- 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.hsourcef:parameter:value:
Write a float paramter to a source.
+ (bool)sourcef:(ALuint)sourceId parameter:(ALenum)parameter value:(ALfloat)valueParameters
- 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.hsourcefv:parameter:values:
Write a float array paramter to a source.
+ (bool)sourcefv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALfloat *)valuesParameters
- 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.hsourcei:parameter:value:
Write an integer paramter to a source.
+ (bool)sourcei:(ALuint)sourceId parameter:(ALenum)parameter value:(ALint)valueParameters
- 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.hsourceiv:parameter:values:
Write an integer array paramter to a source.
+ (bool)sourceiv:(ALuint)sourceId parameter:(ALenum)parameter values:(ALint *)valuesParameters
- 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.hspeedOfSound:
Set the speed of sound.
+ (bool)speedOfSound:(ALfloat)valueParameters
- value
The value to set.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.hstartCapture:
Start capturing audio data.
+ (bool)startCapture:(ALCdevice *)deviceParameters
- device
The device to capture on.
Return Value
TRUE if the operation was successful.
Declared In
ALWrapper.h