|
ObjectAL
2.1
ObjectAL API Reference (iOS) for Kobold2D developers
|
A source represents an object that emits sound which can be heard by a listener. More...
#include <ALSource.h>
Public Member Functions | |
| id | initOnContext: (ALContext *context) |
| Initialize a new source on the specified context. | |
| id< ALSoundSource > | play () |
| Play the currently attached buffer. | |
| bool | queueBuffer: (ALBuffer *buffer) |
| Add a buffer to the buffer queue. | |
| bool | queueBuffer:repeats: (ALBuffer *buffer,[repeats] NSUInteger repeats) |
| Add a buffer to the buffer queue, repeating it multiple times. | |
| bool | queueBuffers: (NSArray *buffers) |
| Add buffers to the buffer queue. | |
| bool | queueBuffers:repeats: (NSArray *buffers,[repeats] NSUInteger repeats) |
| Add buffers to the buffer queue, repeating it multiple times. | |
| bool | unqueueBuffer: (ALBuffer *buffer) |
| Remove a buffer from the buffer queue. | |
| bool | unqueueBuffers: (NSArray *buffers) |
| Remove buffers from the buffer queue. | |
Static Public Member Functions | |
| id | source () |
| Create a new source. | |
| id | sourceOnContext: (ALContext *context) |
| Create a new source on the specified context. | |
Protected Attributes | |
| bool | interruptible |
| If true, this source may be interrupted when resources are low. | |
| float | gain |
| Gain (volume) (OpenAL property). | |
| bool | muted |
| If true, this source is muted. | |
| int | shadowState |
| Shadow value which keeps the correct state value for AL_PLAYING and AL_PAUSED. | |
| bool | abortPlaybackResume |
| Used to abort a pending playback resume if the user calls stop or pause. | |
| OALAction * | gainAction |
| Current action operating on the gain control. | |
| OALAction * | panAction |
| Current action operating on the pan control. | |
| OALAction * | pitchAction |
| Current action operating on the pitch control. | |
| OALSuspendHandler * | suspendHandler |
| Handles suspending and interrupting for this object. | |
Properties | |
| ALBuffer * | buffer |
| The sound buffer this source is attached to (set to nil to detach the currently attached buffer). | |
| int | buffersQueued |
| How many buffers this source has queued. | |
| int | buffersProcessed |
| How many of these buffers have been processed during playback. | |
| ALContext * | context |
| The context this source was opened on. | |
| float | offsetInBytes |
| The offset into the current buffer (in bytes). | |
| float | offsetInSamples |
| The offset into the current buffer (in samples). | |
| float | offsetInSeconds |
| The offset into the current buffer (in seconds). | |
| ALuint | sourceId |
| OpenAL's ID for this source. | |
| int | state |
| The state of this source. | |
A source represents an object that emits sound which can be heard by a listener.
This source can have position, velocity, and direction.
| id ALSource::initOnContext: | ( | ALContext* | context | ) | [virtual] |
Initialize a new source on the specified context.
| context | the context to create the source on. |
| id< ALSoundSource > ALSource::play | ( | ) | [virtual] |
Play the currently attached buffer.
| bool ALSource::queueBuffer: | ( | ALBuffer* | buffer | ) | [virtual] |
Add a buffer to the buffer queue.
| buffer | the buffer to add to the queue. |
| bool ALSource::queueBuffer:repeats: | ( | ALBuffer* | buffer, |
| [repeats] NSUInteger | repeats | ||
| ) | [virtual] |
Add a buffer to the buffer queue, repeating it multiple times.
| buffer | the buffer to add to the queue. |
| repeats | the number of times to repeat the buffer in the queue. |
| bool ALSource::queueBuffers: | ( | NSArray* | buffers | ) | [virtual] |
Add buffers to the buffer queue.
| buffers | the buffers to add to the queue. |
| bool ALSource::queueBuffers:repeats: | ( | NSArray* | buffers, |
| [repeats] NSUInteger | repeats | ||
| ) | [virtual] |
Add buffers to the buffer queue, repeating it multiple times.
The buffers will be played in order, repeating the specified number of times.
| buffers | the buffers to add to the queue. |
| repeats | the number of times to repeat the buffer in the queue. |
| id ALSource::source | ( | ) | [static, virtual] |
Create a new source.
| id ALSource::sourceOnContext: | ( | ALContext* | context | ) | [static, virtual] |
Create a new source on the specified context.
| context | the context to create the source on. |
| bool ALSource::unqueueBuffer: | ( | ALBuffer* | buffer | ) | [virtual] |
Remove a buffer from the buffer queue.
| buffer | the buffer to remove from the queue. |
| bool ALSource::unqueueBuffers: | ( | NSArray* | buffers | ) | [virtual] |
Remove buffers from the buffer queue.
| buffers | the buffers to remove from the queue. |
bool ALSource::abortPlaybackResume [protected] |
Used to abort a pending playback resume if the user calls stop or pause.
float ALSource::gain [protected] |
Gain (volume) (OpenAL property).
Reimplemented from <ALSoundSource>.
OALAction* ALSource::gainAction [protected] |
Current action operating on the gain control.
bool ALSource::interruptible [protected] |
If true, this source may be interrupted when resources are low.
Reimplemented from <ALSoundSource>.
bool ALSource::muted [protected] |
If true, this source is muted.
Reimplemented from <ALSoundSource>.
OALAction* ALSource::panAction [protected] |
Current action operating on the pan control.
OALAction* ALSource::pitchAction [protected] |
Current action operating on the pitch control.
int ALSource::shadowState [protected] |
Shadow value which keeps the correct state value for AL_PLAYING and AL_PAUSED.
We need this due to a buggy OpenAL implementation.
OALSuspendHandler* ALSource::suspendHandler [protected] |
Handles suspending and interrupting for this object.
ALBuffer * ALSource::buffer [read, write, retain] |
The sound buffer this source is attached to (set to nil to detach the currently attached buffer).
int ALSource::buffersProcessed [read, assign] |
How many of these buffers have been processed during playback.
int ALSource::buffersQueued [read, assign] |
How many buffers this source has queued.
ALContext * ALSource::context [read, assign] |
The context this source was opened on.
float ALSource::offsetInBytes [read, write, assign] |
The offset into the current buffer (in bytes).
float ALSource::offsetInSamples [read, write, assign] |
The offset into the current buffer (in samples).
float ALSource::offsetInSeconds [read, write, assign] |
The offset into the current buffer (in seconds).
ALuint ALSource::sourceId [read, assign] |
OpenAL's ID for this source.
int ALSource::state [read, write, assign] |
The state of this source.