A Sound source composed of other sources. More...
#import <ALChannelSource.h>
Instance Methods | |
(id) | - initWithSources: |
Initialize a channel with a number of sources. More... | |
(void) | - setDefaultsFromSource: |
Set this channel's default values from those in the specified source. More... | |
(void) | - resetToDefault |
Reset all sources in this channel to their default state. More... | |
(void) | - addSource: |
Add a source to this channel. More... | |
(id< ALSoundSource >) | - removeSource: |
Remove a source from the channel. More... | |
(ALChannelSource *) | - splitChannelWithSources: |
Split the specified number of sources from this channel, creating a new channel. More... | |
(void) | - addChannel: |
Absorb another channel's sources into this one. More... | |
(NSArray *) | - clearUnusedBuffers |
Set all buffers in all non-playing sources to nil. More... | |
(BOOL) | - removeBuffersNamed: |
Remove all instances of the specified buffer. More... | |
Instance Methods inherited from <ALSoundSource> | |
(id< ALSoundSource >) | - play: |
Play a sound. More... | |
(id< ALSoundSource >) | - play:loop: |
Play a sound, optionally looping. More... | |
(id< ALSoundSource >) | - play:gain:pitch:pan:loop: |
Play a sound, setting gain, pitch, pan, and looping. More... | |
(void) | - stop |
Stop playing the current sound. More... | |
(void) | - rewind |
Stop playing the current sound and set its state to AL_INITIAL. More... | |
(void) | - fadeTo:duration:target:selector: |
Fade to the specified gain value. More... | |
(void) | - stopFade |
Stop the currently running fade operation, if any. More... | |
(void) | - panTo:duration:target:selector: |
pan to the specified value. More... | |
(void) | - stopPan |
Stop the currently running pan operation, if any. More... | |
(void) | - pitchTo:duration:target:selector: |
Gradually change pitch to the specified value. More... | |
(void) | - stopPitch |
Stop the currently running pitch operation, if any. More... | |
(void) | - stopActions |
Stop any currently running fade, pan, or pitch operations. More... | |
(void) | - clear |
Clear any buffers this source is currently using. More... | |
Class Methods | |
(id) | + channelWithSources: |
Create a channel with a number of sources. More... | |
Protected Attributes | |
bool | defaultsInitialized |
If YES, the defaults of this channel have been initialized. More... | |
float | pitch |
float | gain |
float | maxDistance |
float | rolloffFactor |
float | referenceDistance |
float | minGain |
float | maxGain |
float | coneOuterGain |
float | coneInnerAngle |
float | coneOuterAngle |
float | reverbSendLevel |
float | reverbOcclusion |
float | reverbObstruction |
ALPoint | position |
ALVector | velocity |
ALVector | direction |
int | sourceRelative |
int | sourceType |
bool | looping |
float | defaultPitch |
Default pitch. More... | |
float | defaultGain |
Default gain. More... | |
float | defaultMaxDistance |
Default max distance. More... | |
float | defaultRolloffFactor |
Default rolloff factor. More... | |
float | defaultReferenceDistance |
Default reference distance. More... | |
float | defaultMinGain |
Default min gain. More... | |
float | defaultMaxGain |
Default max gain. More... | |
float | defaultConeOuterGain |
Default cone outer gain. More... | |
float | defaultConeInnerAngle |
Default cone inner angle. More... | |
float | defaultConeOuterAngle |
Default cone outer angle. More... | |
ALPoint | defaultPosition |
Default position. More... | |
ALVector | defaultVelocity |
Default veloxity. More... | |
ALVector | defaultDirection |
Default direction. More... | |
int | defaultSourceRelative |
Default source relative. More... | |
int | defaultSourceType |
Default source type. More... | |
bool | defaultLooping |
Default looping. More... | |
float | defaultReverbSendLevel |
Default reverb send level. More... | |
float | defaultReverbOcclusion |
Default occlusion. More... | |
float | defaultReverbObstruction |
Default obstruction. More... | |
bool | interruptible |
bool | muted |
bool | paused |
id | fadeCompleteTarget |
Target to inform when the current fade operation completes. More... | |
SEL | fadeCompleteSelector |
Selector to call when the current fade operation completes. More... | |
int | expectedFadeCallbackCount |
The expected number of sources that will callback when fading completes. More... | |
int | currentFadeCallbackCount |
The actual number of sources that have called back. More... | |
id | panCompleteTarget |
Target to inform when the current pan operation completes. More... | |
SEL | panCompleteSelector |
Selector to call when the current pan operation completes. More... | |
int | expectedPanCallbackCount |
The expected number of sources that will callback when panning completes. More... | |
int | currentPanCallbackCount |
The actual number of sources that have called back. More... | |
id | pitchCompleteTarget |
Target to inform when the current pitch operation completes. More... | |
SEL | pitchCompleteSelector |
Selector to call when the current pitch operation completes. More... | |
int | expectedPitchCallbackCount |
The expected number of sources that will callback when pitch op completes. More... | |
int | currentPitchCallbackCount |
The actual number of sources that have called back. More... | |
Properties | |
ALContext * | context |
This source's owning context. More... | |
ALSoundSourcePool * | sourcePool |
Pool holding the actual sources. More... | |
int | reservedSources |
The number of sources reserved by this channel. More... | |
Properties inherited from <ALSoundSource> | |
float | coneInnerAngle |
Cone inner angle (OpenAL property). More... | |
float | coneOuterAngle |
Cone outer angle (OpenAL property). More... | |
float | coneOuterGain |
Cone outer gain (OpenAL property). More... | |
ALVector | direction |
Direction (OpenAL property). More... | |
float | gain |
Gain (volume) (OpenAL property). More... | |
float | volume |
Volume (alias to gain). More... | |
bool | interruptible |
If true, this source may be interrupted when resources are low. More... | |
bool | looping |
Looping (OpenAL property). More... | |
float | maxDistance |
Max distance (OpenAL property). More... | |
float | maxGain |
Max gain (OpenAL property). More... | |
float | minGain |
Min gain (OpenAL property). More... | |
bool | muted |
If true, this source is muted. More... | |
bool | paused |
If true, this source is currently paused. More... | |
float | pitch |
Pitch (OpenAL property). More... | |
bool | playing |
If true, this source is currently playing audio. More... | |
ALPoint | position |
Position (OpenAL property). More... | |
float | referenceDistance |
Reference distance (OpenAL property). More... | |
float | rolloffFactor |
Rolloff factor (OpenAL property). More... | |
int | sourceRelative |
Source relative (OpenAL property). More... | |
int | sourceType |
Source type (OpenAL property). More... | |
ALVector | velocity |
Velocity (OpenAL property). More... | |
float | pan |
Pan value (-1.0 = far left, 1.0 = far right). More... | |
float | reverbSendLevel |
Reverb send level (how much reverb affects this source). More... | |
float | reverbOcclusion |
Reverb occlusion (wall/door between listener and source). More... | |
float | reverbObstruction |
Reverb obstruction (object between listener and source). More... | |
A Sound source composed of other sources.
Property values are applied to all sources within the channel.
Sounds will get played by any free sources within this channel.
If all sources are busy when playback is requested, it will attempt to interrupt a source to free it for playback.
- (void) addChannel: | (ALChannelSource*) | channel |
Absorb another channel's sources into this one.
All of the channel's sources will be moved into this channel.
channel | The channel to absorb sources from. |
- (void) addSource: | (id<ALSoundSource>) | source |
Add a source to this channel.
source | The source to add. |
+ (id) channelWithSources: | (int) | reservedSources |
Create a channel with a number of sources.
reservedSources | the number of sources to reserve for this channel. |
- (NSArray *) clearUnusedBuffers |
Set all buffers in all non-playing sources to nil.
- (id) initWithSources: | (int) | reservedSources |
Initialize a channel with a number of sources.
reservedSources | the number of sources to reserve for this channel. |
- (BOOL) removeBuffersNamed: | (NSString*) | name |
Remove all instances of the specified buffer.
name | The name of the buffer. |
- (id< ALSoundSource >) removeSource: | (id<ALSoundSource>) | source |
Remove a source from the channel.
source | The source to remove. If nil, remove any source. |
- (void) resetToDefault |
Reset all sources in this channel to their default state.
- (void) setDefaultsFromSource: | (id<ALSoundSource>) | source |
Set this channel's default values from those in the specified source.
source | the source to set default values from. |
- (ALChannelSource *) splitChannelWithSources: | (int) | numSources |
Split the specified number of sources from this channel, creating a new channel.
numSources | The number of sources to split off |
|
protected |
The actual number of sources that have called back.
|
protected |
The actual number of sources that have called back.
|
protected |
The actual number of sources that have called back.
|
protected |
Default cone inner angle.
|
protected |
Default cone outer angle.
|
protected |
Default cone outer gain.
|
protected |
Default direction.
|
protected |
Default gain.
|
protected |
Default looping.
|
protected |
Default max distance.
|
protected |
Default max gain.
|
protected |
Default min gain.
|
protected |
Default pitch.
|
protected |
Default position.
|
protected |
Default reference distance.
|
protected |
Default obstruction.
|
protected |
Default occlusion.
|
protected |
Default reverb send level.
|
protected |
Default rolloff factor.
|
protected |
If YES, the defaults of this channel have been initialized.
|
protected |
Default source relative.
|
protected |
Default source type.
|
protected |
Default veloxity.
|
protected |
The expected number of sources that will callback when fading completes.
|
protected |
The expected number of sources that will callback when panning completes.
|
protected |
The expected number of sources that will callback when pitch op completes.
|
protected |
Selector to call when the current fade operation completes.
|
protected |
Target to inform when the current fade operation completes.
|
protected |
Selector to call when the current pan operation completes.
|
protected |
Target to inform when the current pan operation completes.
|
protected |
Selector to call when the current pitch operation completes.
|
protected |
Target to inform when the current pitch operation completes.
|
readnonatomicretain |
This source's owning context.
|
readwritenonatomicassign |
The number of sources reserved by this channel.
|
readnonatomicretain |
Pool holding the actual sources.
All sources being used by this channel.
Do not modify!