Manager class for OpenAL objects (ObjectAL). More...
#import <OpenALManager.h>
Instance Methods | |
(ALBuffer *) | - bufferFromFile: |
Load an OpenAL buffer with the contents of an audio file. More... | |
(ALBuffer *) | - bufferFromFile:reduceToMono: |
Load an OpenAL buffer with the contents of an audio file. More... | |
(ALBuffer *) | - bufferFromUrl: |
Load an OpenAL buffer with the contents of an audio file. More... | |
(ALBuffer *) | - bufferFromUrl:reduceToMono: |
Load an OpenAL buffer with the contents of an audio file. More... | |
(NSString *) | - bufferAsyncFromFile:target:selector: |
Load an OpenAL buffer with the contents of an audio file asynchronously. More... | |
(NSString *) | - bufferAsyncFromFile:reduceToMono:target:selector: |
Load an OpenAL buffer with the contents of an audio file asynchronously. More... | |
(NSString *) | - bufferAsyncFromUrl:target:selector: |
Load an OpenAL buffer with the contents of a URL asynchronously. More... | |
(NSString *) | - bufferAsyncFromUrl:reduceToMono:target:selector: |
Load an OpenAL buffer with the contents of a URL asynchronously. More... | |
(void) | - clearAllBuffers |
Clear all references to sound data from ALL buffers, managed or not. More... | |
Instance Methods inherited from <OALSuspendManager> | |
(void) | - addSuspendListener: |
Add a listener that will receive manual suspend and interrupt events. More... | |
(void) | - removeSuspendListener: |
Remove a registered listener. More... | |
Protected Member Functions | |
() | - SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER |
Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods. More... | |
Protected Attributes | |
NSMutableArray * | devices |
All opened devices. More... | |
OALSuspendHandler * | suspendHandler |
Handles suspending and interrupting for this object. More... | |
NSOperationQueue * | operationQueue |
Operation queue for asynchronous loading. More... | |
Properties | |
NSArray * | availableDevices |
List of available playback devices (NSString*). More... | |
NSArray * | availableCaptureDevices |
List of available capture devices (NSString*). More... | |
ALContext * | currentContext |
The current context (some context operations require the context to be the "current" one). More... | |
NSString * | defaultCaptureDeviceSpecifier |
Name of the default capture device. More... | |
NSString * | defaultDeviceSpecifier |
Name of the default playback device. More... | |
NSArray * | devices |
List of all open devices (ALDevice*). More... | |
ALdouble | mixerOutputFrequency |
The frequency of the output mixer. More... | |
ALint | renderingQuality |
The rendering quality. More... | |
Properties inherited from <OALSuspendManager> | |
bool | suspended |
If YES, this object is suspended. More... | |
Properties inherited from <OALSuspendListener> | |
bool | manuallySuspended |
Set to YES to manually suspend. More... | |
bool | interrupted |
If YES, this object is interrupted. More... | |
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 *) bufferAsyncFromFile: | (NSString*) | filePath | |
reduceToMono: | (bool) | reduceToMono | |
target: | (id) | target | |
selector: | (SEL) | selector | |
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 *) bufferAsyncFromFile: | (NSString*) | filePath | |
target: | (id) | target | |
selector: | (SEL) | selector | |
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 *) bufferAsyncFromUrl: | (NSURL*) | url | |
reduceToMono: | (bool) | reduceToMono | |
target: | (id) | target | |
selector: | (SEL) | selector | |
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 *) bufferAsyncFromUrl: | (NSURL*) | url | |
target: | (id) | target | |
selector: | (SEL) | selector | |
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 *) bufferFromFile: | (NSString*) | filePath |
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 *) bufferFromFile: | (NSString*) | filePath | |
reduceToMono: | (bool) | reduceToMono | |
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 *) bufferFromUrl: | (NSURL*) | url |
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 *) bufferFromUrl: | (NSURL*) | url | |
reduceToMono: | (bool) | reduceToMono | |
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) clearAllBuffers |
Clear all references to sound data from ALL buffers, managed or not.
- OpenALManager: | (OpenALManager) |
Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods.
- (OpenALManager*) sharedInstance: Get the shared singleton instance.
- (void) purgeSharedInstance: Purge (deallocate) the shared instance.
|
protected |
All opened devices.
|
protected |
Operation queue for asynchronous loading.
|
protected |
Handles suspending and interrupting for this object.
|
readnonatomicretain |
List of available capture devices (NSString*).
|
readnonatomicretain |
List of available playback devices (NSString*).
|
readwritenonatomicassign |
The current context (some context operations require the context to be the "current" one).
WEAK reference.
|
readnonatomicretain |
Name of the default capture device.
|
readnonatomicretain |
Name of the default playback device.
|
readnonatomicretain |
List of all open devices (ALDevice*).
|
readwritenonatomicassign |
The frequency of the output mixer.
|
readwritenonatomicassign |
The rendering quality.
Can be one of: