A context encompasses a single listener and a series of sources. More...
#import <ALContext.h>
Instance Methods | |
| (id) | - initOnDevice:outputFrequency:refreshIntervals:synchronousContext:monoSources:stereoSources: |
| Initialize this context on the specified device with attributes. More... | |
| (id) | - initOnDevice:attributes: |
| Initialize this context for the specified device and attributes. More... | |
| (void) | - process |
| Process this context. More... | |
| (void) | - stopAllSounds |
| Stop all sound sources in this context. More... | |
| (void) | - clearBuffers |
| Clear all buffers being used by sources in this context. More... | |
| (void) | - ensureContextIsCurrent |
| Make sure this context is the current context. More... | |
| (bool) | - isExtensionPresent: |
| Check if the specified extension is present in this context. More... | |
| (void *) | - getProcAddress: |
| Get the address of the specified procedure (C function address). 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... | |
Class Methods | |
| (id) | + contextOnDevice:attributes: |
| Create a new context on the specified device. More... | |
| (id) | + contextOnDevice:outputFrequency:refreshIntervals:synchronousContext:monoSources:stereoSources: |
| Create a new context on the specified device with attributes. More... | |
Protected Attributes | |
| NSMutableArray * | sources |
| All sound sources associated with this context. More... | |
| bool | suspended |
| NSMutableArray * | attributes |
| This context's attributes. More... | |
| OALSuspendHandler * | suspendHandler |
| Handles suspending and interrupting for this object. More... | |
Properties | |
| NSString * | alVersion |
| OpenAL version string in format “[spec major number]. More... | |
| NSArray * | attributes |
| The current context's attribute list. More... | |
| ALCcontext * | context |
| The OpenAL context pointer. More... | |
| ALDevice * | device |
| The device this context was opened on. More... | |
| ALenum | distanceModel |
| The current distance model. More... | |
| float | dopplerFactor |
| Exaggeration factor for Doppler effect. More... | |
| NSArray * | extensions |
| List of available extensions (NSString*). More... | |
| ALListener * | listener |
| This context's listener. More... | |
| NSString * | renderer |
| Information about the specific renderer. More... | |
| NSArray * | sources |
| All sources associated with this context (ALSource*). More... | |
| float | speedOfSound |
| Speed of sound in same units as velocities. More... | |
| NSString * | vendor |
| Name of the vendor. 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... | |
A context encompasses a single listener and a series of sources.
A context is created from a device, and many contexts may be created (though multiple contexts would be unusual in an iOS app).
Note: Some property values are only valid if this context is the current context.
| - (void) clearBuffers |
Clear all buffers being used by sources in this context.
| + (id) contextOnDevice: | (ALDevice *) | device | |
| attributes: | (NSArray*) | attributes | |
Create a new context on the specified device.
| device | The device to open the context on. |
| attributes | An array of NSNumber in ordered pairs (attribute id followed by integer value). Posible attributes: ALC_FREQUENCY, ALC_REFRESH, ALC_SYNC, ALC_MONO_SOURCES, ALC_STEREO_SOURCES |
| + (id) contextOnDevice: | (ALDevice*) | device | |
| outputFrequency: | (int) | outputFrequency | |
| refreshIntervals: | (int) | refreshIntervals | |
| synchronousContext: | (bool) | synchronousContext | |
| monoSources: | (int) | monoSources | |
| stereoSources: | (int) | stereoSources | |
Create a new context on the specified device with attributes.
| device | The device to open the context on. |
| outputFrequency | The frequency to mix all sources to before outputting (ignored by iOS). |
| refreshIntervals | The number of passes per second used to mix the audio sources. For games this can be 5-15. For audio intensive apps, it should be higher (ignored by iOS). |
| synchronousContext | If true, this context runs on the main thread and depends on you calling alcUpdateContext (ignored by iOS). |
| monoSources | A hint indicating how many sources should support mono (default 28 on iOS). |
| stereoSources | A hint indicating how many sources should support stereo (default 4 on iOS). |
| - (void) ensureContextIsCurrent |
Make sure this context is the current context.
This method is used to work around iOS 4.0 and 4.2 bugs that could cause the context to be lost.
| - (void *) getProcAddress: | (NSString*) | functionName |
Get the address of the specified procedure (C function address).
Only valid when this is the current context.
Note: The OpenAL implementation is free to return a pointer even if it is not valid for this context. Always call isExtensionPresent first.
| functionName | the name of the procedure to get. |
| - (id) initOnDevice: | (ALDevice *) | device | |
| attributes: | (NSArray*) | attributes | |
Initialize this context for the specified device and attributes.
| device | The device to open the context on. |
| attributes | An array of NSNumber in ordered pairs (attribute id followed by integer value). Posible attributes: ALC_FREQUENCY, ALC_REFRESH, ALC_SYNC, ALC_MONO_SOURCES, ALC_STEREO_SOURCES |
| - (id) initOnDevice: | (ALDevice*) | device | |
| outputFrequency: | (int) | outputFrequency | |
| refreshIntervals: | (int) | refreshIntervals | |
| synchronousContext: | (bool) | synchronousContext | |
| monoSources: | (int) | monoSources | |
| stereoSources: | (int) | stereoSources | |
Initialize this context on the specified device with attributes.
| device | The device to open the context on. |
| outputFrequency | The frequency to mix all sources to before outputting (ignored by iOS). |
| refreshIntervals | The number of passes per second used to mix the audio sources. For games this can be 5-15. For audio intensive apps, it should be higher (ignored by iOS). |
| synchronousContext | If true, this context runs on the main thread and depends on you calling alcUpdateContext (ignored by iOS). |
| monoSources | A hint indicating how many sources should support mono (default 28 on iOS). |
| stereoSources | A hint indicating how many sources should support stereo (default 4 on iOS). |
| - (bool) isExtensionPresent: | (NSString*) | name |
Check if the specified extension is present in this context.
Only valid when this is the current context.
| name | The name of the extension to check. |
| - (void) process |
Process this context.
| - (void) stopAllSounds |
Stop all sound sources in this context.
|
protected |
This context's attributes.
|
protected |
All sound sources associated with this context.
|
protected |
Handles suspending and interrupting for this object.
|
readnonatomicretain |
OpenAL version string in format “[spec major number].
[spec minor number] [optional vendor version information]” Only valid when this is the current context.
|
readnonatomicretain |
The current context's attribute list.
Only valid when this is the current context.
|
readnonatomicassign |
The OpenAL context pointer.
|
readnonatomicretain |
The device this context was opened on.
|
readwritenonatomicassign |
The current distance model.
Legal values are AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, AL_EXPONENT_DISTANCE, and AL_EXPONENT_DISTANCE_CLAMPED. See the OpenAL spec for detailed information.
Only valid when this is the current context.
|
readwritenonatomicassign |
Exaggeration factor for Doppler effect.
Only valid when this is the current context.
|
readnonatomicretain |
List of available extensions (NSString*).
Only valid when this is the current context.
|
readnonatomicretain |
This context's listener.
|
readnonatomicretain |
Information about the specific renderer.
Only valid when this is the current context.
|
readnonatomicretain |
All sources associated with this context (ALSource*).
|
readwritenonatomicassign |
Speed of sound in same units as velocities.
Only valid when this is the current context.
|
readnonatomicretain |
Name of the vendor.
Only valid when this is the current context.
1.8.3.1