|
ObjectAL
2.1
ObjectAL API Reference (iOS) for Kobold2D developers
|
Manager class for OpenAL objects (ObjectAL). More...
#include <OpenALManager.h>
Public Member Functions | |
| ALBuffer * | bufferFromFile: (NSString *filePath) |
| Load an OpenAL buffer with the contents of an audio file. | |
| ALBuffer * | bufferFromFile:reduceToMono: (NSString *filePath,[reduceToMono] bool reduceToMono) |
| Load an OpenAL buffer with the contents of an audio file. | |
| ALBuffer * | bufferFromUrl: (NSURL *url) |
| Load an OpenAL buffer with the contents of an audio file. | |
| ALBuffer * | bufferFromUrl:reduceToMono: (NSURL *url,[reduceToMono] bool reduceToMono) |
| Load an OpenAL buffer with the contents of an audio file. | |
| NSString * | bufferAsyncFromFile:target:selector: (NSString *filePath,[target] id target,[selector] SEL selector) |
| Load an OpenAL buffer with the contents of an audio file asynchronously. | |
| NSString * | bufferAsyncFromFile:reduceToMono:target:selector: (NSString *filePath,[reduceToMono] bool reduceToMono,[target] id target,[selector] SEL selector) |
| Load an OpenAL buffer with the contents of an audio file asynchronously. | |
| NSString * | bufferAsyncFromUrl:target:selector: (NSURL *url,[target] id target,[selector] SEL selector) |
| Load an OpenAL buffer with the contents of a URL asynchronously. | |
| NSString * | bufferAsyncFromUrl:reduceToMono:target:selector: (NSURL *url,[reduceToMono] bool reduceToMono,[target] id target,[selector] SEL selector) |
| Load an OpenAL buffer with the contents of a URL asynchronously. | |
| void | clearAllBuffers () |
| Clear all references to sound data from ALL buffers, managed or not. | |
| void | notifyDeviceInitializing: (ALDevice *device) |
| (INTERNAL USE) Notify that a device is initializing. | |
| void | notifyDeviceDeallocating: (ALDevice *device) |
| (INTERNAL USE) Notify that a device is deallocating. | |
Protected Member Functions | |
| SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER (OpenALManager) | |
| Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods. | |
Protected Attributes | |
| __unsafe_unretained ALContext * | currentContext |
| NSMutableArray * | devices |
| All opened devices. | |
| OALSuspendHandler * | suspendHandler |
| Handles suspending and interrupting for this object. | |
| NSOperationQueue * | operationQueue |
| Operation queue for asynchronous loading. | |
Properties | |
| NSArray * | availableDevices |
| List of available playback devices (NSString*). | |
| NSArray * | availableCaptureDevices |
| List of available capture devices (NSString*). | |
| ALContext * | currentContext |
| The current context (some context operations require the context to be the "current" one). | |
| NSString * | defaultCaptureDeviceSpecifier |
| Name of the default capture device. | |
| NSString * | defaultDeviceSpecifier |
| Name of the default playback device. | |
| NSArray * | devices |
| List of all open devices (ALDevice*). | |
| ALdouble | mixerOutputFrequency |
| The frequency of the output mixer. | |
Manager class for OpenAL objects (ObjectAL).
Keeps track of devices that have been opened, and allows high level OpenAL management.
Provides methods for loading ALBuffer objects from audio files.
The OpenAL 1.1 specification is available at http://connect.creativelabs.com/openal/Documentation
Be sure to read through it (especially the part about distance models) as ObjectAL follows the OpenAL object model.
Alternatively, you may opt to use OALSimpleAudio for a simpler interface.
| NSString * OpenALManager::bufferAsyncFromFile:reduceToMono:target:selector: | ( | NSString* | filePath, |
| [reduceToMono] bool | reduceToMono, | ||
| [target] id | target, | ||
| [selector] SEL | selector | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file asynchronously.
This method will schedule a request to have the buffer created and filled, and then call the specified selector with the newly created buffer.
The buffer's name will be the fully qualified URL of the path.
Returns the fully qualified URL of the path, which you can match up to the buffer name in your callback method.
See the class description note regarding sound file formats.
| filePath | The path of the file containing the audio data. |
| reduceToMono | If true, reduce the sample to mono (stereo samples don't support panning or positional audio). |
| target | The target to call when the buffer is loaded. |
| selector | The selector to invoke when the buffer is loaded. |
| NSString * OpenALManager::bufferAsyncFromFile:target:selector: | ( | NSString* | filePath, |
| [target] id | target, | ||
| [selector] SEL | selector | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file asynchronously.
This method will schedule a request to have the buffer created and filled, and then call the specified selector with the newly created buffer.
The buffer's name will be the fully qualified URL of the path.
Returns the fully qualified URL of the path, which you can match up to the buffer name in your callback method.
See the class description note regarding sound file formats.
| filePath | The path of the file containing the audio data. |
| target | The target to call when the buffer is loaded. |
| selector | The selector to invoke when the buffer is loaded. |
| NSString * OpenALManager::bufferAsyncFromUrl:reduceToMono:target:selector: | ( | NSURL* | url, |
| [reduceToMono] bool | reduceToMono, | ||
| [target] id | target, | ||
| [selector] SEL | selector | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of a URL asynchronously.
This method will schedule a request to have the buffer created and filled, and then call the specified selector with the newly created buffer.
The buffer's name will be the fully qualified URL.
Returns the fully qualified URL, which you can match up to the buffer name in your callback method.
See the class description note regarding sound file formats.
| url | The URL of the file containing the audio data. |
| reduceToMono | If true, reduce the sample to mono (stereo samples don't support panning or positional audio). |
| target | The target to call when the buffer is loaded. |
| selector | The selector to invoke when the buffer is loaded. |
| NSString * OpenALManager::bufferAsyncFromUrl:target:selector: | ( | NSURL* | url, |
| [target] id | target, | ||
| [selector] SEL | selector | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of a URL asynchronously.
This method will schedule a request to have the buffer created and filled, and then call the specified selector with the newly created buffer.
The buffer's name will be the fully qualified URL.
Returns the fully qualified URL, which you can match up to the buffer name in your callback method.
See the class description note regarding sound file formats.
| url | The URL of the file containing the audio data. |
| target | The target to call when the buffer is loaded. |
| selector | The selector to invoke when the buffer is loaded. |
| ALBuffer * OpenALManager::bufferFromFile: | ( | NSString* | filePath | ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file.
The buffer's name will be the fully qualified URL of the path.
See the class description note regarding sound file formats.
| filePath | The path of the file containing the audio data. |
| ALBuffer * OpenALManager::bufferFromFile:reduceToMono: | ( | NSString* | filePath, |
| [reduceToMono] bool | reduceToMono | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file.
The buffer's name will be the fully qualified URL of the path.
See the class description note regarding sound file formats.
| filePath | The path of the file containing the audio data. |
| reduceToMono | If true, reduce the sample to mono (stereo samples don't support panning or positional audio). |
| ALBuffer * OpenALManager::bufferFromUrl: | ( | NSURL* | url | ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file.
The buffer's name will be the fully qualified URL.
See the class description note regarding sound file formats.
| url | The URL of the file containing the audio data. |
| ALBuffer * OpenALManager::bufferFromUrl:reduceToMono: | ( | NSURL* | url, |
| [reduceToMono] bool | reduceToMono | ||
| ) | [virtual] |
Load an OpenAL buffer with the contents of an audio file.
The buffer's name will be the fully qualified URL.
See the class description note regarding sound file formats.
| url | The URL of the file containing the audio data. |
| reduceToMono | If true, reduce the sample to mono (stereo samples don't support panning or positional audio). |
| void OpenALManager::clearAllBuffers | ( | ) | [virtual] |
Clear all references to sound data from ALL buffers, managed or not.
| void OpenALManager::notifyDeviceDeallocating: | ( | ALDevice* | device | ) | [virtual] |
(INTERNAL USE) Notify that a device is deallocating.
| void OpenALManager::notifyDeviceInitializing: | ( | ALDevice* | device | ) | [virtual] |
(INTERNAL USE) Notify that a device is initializing.
| OpenALManager::SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER | ( | OpenALManager | ) | [protected] |
Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods.
- (OpenALManager*) sharedInstance: Get the shared singleton instance.
- (void) purgeSharedInstance: Purge (deallocate) the shared instance.
NSMutableArray* OpenALManager::devices [protected] |
All opened devices.
NSOperationQueue* OpenALManager::operationQueue [protected] |
Operation queue for asynchronous loading.
OALSuspendHandler* OpenALManager::suspendHandler [protected] |
Handles suspending and interrupting for this object.
NSArray * OpenALManager::availableCaptureDevices [read, assign] |
List of available capture devices (NSString*).
NSArray * OpenALManager::availableDevices [read, assign] |
List of available playback devices (NSString*).
ALContext* OpenALManager::currentContext [read, write, assign] |
The current context (some context operations require the context to be the "current" one).
NSString * OpenALManager::defaultCaptureDeviceSpecifier [read, assign] |
Name of the default capture device.
NSString * OpenALManager::defaultDeviceSpecifier [read, assign] |
Name of the default playback device.
NSArray* OpenALManager::devices [read, assign] |
List of all open devices (ALDevice*).
ALdouble OpenALManager::mixerOutputFrequency [read, write, assign] |
The frequency of the output mixer.