ALChannelSource Class Reference
Inherits from | NSObject |
Conforms to | ALSoundSource |
Declared in | ALChannelSource.h |
Overview
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.
Tasks
-
context
This source’s owning context.
property -
sourcePool
All sources being used by this channel. Do not modify!
property -
reservedSources
The number of sources reserved by this channel.
property -
+ channelWithSources:
Create a channel with a number of sources.
-
– initWithSources:
Initialize a channel with a number of sources.
-
– setDefaultsFromSource:
Set this channel’s default values from those in the specified source.
-
– resetToDefault
Reset all sources in this channel to their default state.
-
– addSource:
Add a source to this channel.
-
– removeSource:
Remove a source from the channel.
-
– splitChannelWithSources:
Split the specified number of sources from this channel, creating a new channel.
-
– addChannel:
Absorb another channel’s sources into this one. All of the channel’s sources will be moved into this channel.
Properties
context
This source’s owning context.
@property (nonatomic, readonly) ALContext *context
Declared In
ALChannelSource.h
Instance Methods
addChannel:
Absorb another channel’s sources into this one. All of the channel’s sources will be moved into this channel.
- (void)addChannel:(ALChannelSource *)channel
Parameters
- channel
The channel to absorb sources from.
Declared In
ALChannelSource.h
addSource:
Add a source to this channel.
- (void)addSource:(id<ALSoundSource>)source
Parameters
- source
The source to add.
Declared In
ALChannelSource.h
initWithSources:
Initialize a channel with a number of sources.
- (id)initWithSources:(int)reservedSources
Parameters
- reservedSources
the number of sources to reserve for this channel.
Return Value
The initialized channel.
Declared In
ALChannelSource.h
removeSource:
Remove a source from the channel.
- (id<ALSoundSource>)removeSource:(id<ALSoundSource>)source
Parameters
- source
The source to remove. If nil, remove any source.
Return Value
The source that was removed.
Declared In
ALChannelSource.h
resetToDefault
Reset all sources in this channel to their default state.
- (void)resetToDefault
Declared In
ALChannelSource.h
setDefaultsFromSource:
Set this channel’s default values from those in the specified source.
- (void)setDefaultsFromSource:(id<ALSoundSource>)source
Parameters
- source
the source to set default values from.
Declared In
ALChannelSource.h
splitChannelWithSources:
Split the specified number of sources from this channel, creating a new channel.
- (ALChannelSource *)splitChannelWithSources:(int)numSources
Parameters
- numSources
The number of sources to split off
Return Value
A new channel with the split-off sources.
Declared In
ALChannelSource.h