ObjectAL  2.1
ObjectAL API Reference (iOS) for Kobold2D developers
ALChannelSource Class Reference

A Sound source composed of other sources. More...

#include <ALChannelSource.h>

Inheritance diagram for ALChannelSource:
Collaboration diagram for ALChannelSource:

List of all members.

Public Member Functions

id initWithSources: (int reservedSources)
 Initialize a channel with a number of sources.
void setDefaultsFromSource: (id< ALSoundSource > source)
 Set this channel's default values from those in the specified source.
void resetToDefault ()
 Reset all sources in this channel to their default state.
void addSource: (id< ALSoundSource > source)
 Add a source to this channel.
id< ALSoundSourceremoveSource: (id< ALSoundSource > source)
 Remove a source from the channel.
ALChannelSourcesplitChannelWithSources: (int numSources)
 Split the specified number of sources from this channel, creating a new channel.
void addChannel: (ALChannelSource *channel)
 Absorb another channel's sources into this one.

Static Public Member Functions

id channelWithSources: (int reservedSources)
 Create a channel with a number of sources.

Protected Attributes

bool defaultsInitialized
 If YES, the defaults of this channel have been initialized.
float pitch
 Pitch (OpenAL property).
float gain
 Gain (volume) (OpenAL property).
float maxDistance
 Max distance (OpenAL property).
float rolloffFactor
 Rolloff factor (OpenAL property).
float referenceDistance
 Reference distance (OpenAL property).
float minGain
 Min gain (OpenAL property).
float maxGain
 Max gain (OpenAL property).
float coneOuterGain
 Cone outer gain (OpenAL property).
float coneInnerAngle
 Cone inner angle (OpenAL property).
float coneOuterAngle
 Cone outer angle (OpenAL property).
ALPoint position
 Position (OpenAL property).
ALVector velocity
 Velocity (OpenAL property).
ALVector direction
 Direction (OpenAL property).
int sourceRelative
 Source relative (OpenAL property).
int sourceType
 Source type (OpenAL property).
bool looping
 Looping (OpenAL property).
float defaultPitch
 Default pitch.
float defaultGain
 Default gain.
float defaultMaxDistance
 Default max distance.
float defaultRolloffFactor
 Default rolloff factor.
float defaultReferenceDistance
 Default reference distance.
float defaultMinGain
 Default min gain.
float defaultMaxGain
 Default max gain.
float defaultConeOuterGain
 Default cone outer gain.
float defaultConeInnerAngle
 Default cone inner angle.
float defaultConeOuterAngle
 Default cone outer angle.
ALPoint defaultPosition
 Default position.
ALVector defaultVelocity
 Default veloxity.
ALVector defaultDirection
 Default direction.
int defaultSourceRelative
 Default source relative.
int defaultSourceType
 Default source type.
bool defaultLooping
 Default looping.
bool interruptible
 If true, this source may be interrupted when resources are low.
bool muted
 If true, this source is muted.
bool paused
 If true, this source is currently paused.
id fadeCompleteTarget
 Target to inform when the current fade operation completes.
SEL fadeCompleteSelector
 Selector to call when the current fade operation completes.
int expectedFadeCallbackCount
 The expected number of sources that will callback when fading completes.
int currentFadeCallbackCount
 The actual number of sources that have called back.
id panCompleteTarget
 Target to inform when the current pan operation completes.
SEL panCompleteSelector
 Selector to call when the current pan operation completes.
int expectedPanCallbackCount
 The expected number of sources that will callback when panning completes.
int currentPanCallbackCount
 The actual number of sources that have called back.
id pitchCompleteTarget
 Target to inform when the current pitch operation completes.
SEL pitchCompleteSelector
 Selector to call when the current pitch operation completes.
int expectedPitchCallbackCount
 The expected number of sources that will callback when pitch op completes.
int currentPitchCallbackCount
 The actual number of sources that have called back.

Properties

ALContextcontext
 This source's owning context.
ALSoundSourcePoolsourcePool
 Pool holding the actual sources.
int reservedSources
 The number of sources reserved by this channel.

Detailed Description

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.


Member Function Documentation

void ALChannelSource::addChannel: ( ALChannelSource channel) [virtual]

Absorb another channel's sources into this one.

All of the channel's sources will be moved into this channel.

Parameters:
channelThe channel to absorb sources from.
void ALChannelSource::addSource: ( id<ALSoundSource source) [virtual]

Add a source to this channel.

Parameters:
sourceThe source to add.
id ALChannelSource::channelWithSources: ( int  reservedSources) [static, virtual]

Create a channel with a number of sources.

Parameters:
reservedSourcesthe number of sources to reserve for this channel.
Returns:
A new channel.
id ALChannelSource::initWithSources: ( int  reservedSources) [virtual]

Initialize a channel with a number of sources.

Parameters:
reservedSourcesthe number of sources to reserve for this channel.
Returns:
The initialized channel.
id< ALSoundSource > ALChannelSource::removeSource: ( id<ALSoundSource source) [virtual]

Remove a source from the channel.

Parameters:
sourceThe source to remove. If nil, remove any source.
Returns:
The source that was removed.
void ALChannelSource::resetToDefault ( ) [virtual]

Reset all sources in this channel to their default state.

void ALChannelSource::setDefaultsFromSource: ( id<ALSoundSource source) [virtual]

Set this channel's default values from those in the specified source.

Parameters:
sourcethe source to set default values from.
ALChannelSource * ALChannelSource::splitChannelWithSources: ( int  numSources) [virtual]

Split the specified number of sources from this channel, creating a new channel.

Parameters:
numSourcesThe number of sources to split off
Returns:
A new channel with the split-off sources.

Member Data Documentation

Cone inner angle (OpenAL property).

Reimplemented from <ALSoundSource>.

Cone outer angle (OpenAL property).

Reimplemented from <ALSoundSource>.

float ALChannelSource::coneOuterGain [protected]

Cone outer gain (OpenAL property).

Reimplemented from <ALSoundSource>.

The actual number of sources that have called back.

The actual number of sources that have called back.

The actual number of sources that have called back.

Default cone inner angle.

Default cone outer angle.

Default cone outer gain.

Default direction.

float ALChannelSource::defaultGain [protected]

Default gain.

Default looping.

Default max distance.

Default max gain.

Default min gain.

float ALChannelSource::defaultPitch [protected]

Default pitch.

Default position.

Default reference distance.

Default rolloff factor.

If YES, the defaults of this channel have been initialized.

Default source relative.

Default source type.

Default veloxity.

Direction (OpenAL property).

Reimplemented from <ALSoundSource>.

The expected number of sources that will callback when fading completes.

The expected number of sources that will callback when panning completes.

The expected number of sources that will callback when pitch op completes.

Selector to call when the current fade operation completes.

Target to inform when the current fade operation completes.

float ALChannelSource::gain [protected]

Gain (volume) (OpenAL property).

Reimplemented from <ALSoundSource>.

If true, this source may be interrupted when resources are low.

Reimplemented from <ALSoundSource>.

bool ALChannelSource::looping [protected]

Looping (OpenAL property).

Reimplemented from <ALSoundSource>.

float ALChannelSource::maxDistance [protected]

Max distance (OpenAL property).

Reimplemented from <ALSoundSource>.

float ALChannelSource::maxGain [protected]

Max gain (OpenAL property).

Reimplemented from <ALSoundSource>.

float ALChannelSource::minGain [protected]

Min gain (OpenAL property).

Reimplemented from <ALSoundSource>.

bool ALChannelSource::muted [protected]

If true, this source is muted.

Reimplemented from <ALSoundSource>.

Selector to call when the current pan operation completes.

Target to inform when the current pan operation completes.

bool ALChannelSource::paused [protected]

If true, this source is currently paused.

Reimplemented from <ALSoundSource>.

float ALChannelSource::pitch [protected]

Pitch (OpenAL property).

Reimplemented from <ALSoundSource>.

Selector to call when the current pitch operation completes.

Target to inform when the current pitch operation completes.

Position (OpenAL property).

Reimplemented from <ALSoundSource>.

Reference distance (OpenAL property).

Reimplemented from <ALSoundSource>.

float ALChannelSource::rolloffFactor [protected]

Rolloff factor (OpenAL property).

Reimplemented from <ALSoundSource>.

Source relative (OpenAL property).

Reimplemented from <ALSoundSource>.

int ALChannelSource::sourceType [protected]

Source type (OpenAL property).

Reimplemented from <ALSoundSource>.

Velocity (OpenAL property).

Reimplemented from <ALSoundSource>.


Property Documentation

ALContext * ALChannelSource::context [read, assign]

This source's owning context.

int ALChannelSource::reservedSources [read, write, assign]

The number of sources reserved by this channel.

ALSoundSourcePool * ALChannelSource::sourcePool [read, assign]

Pool holding the actual sources.

All sources being used by this channel.

Do not modify!


The documentation for this class was generated from the following files: