ObjectAL
 All Classes Functions Variables Properties Pages
Instance Methods | Class Methods | Protected Attributes | Properties | List of all members
ALSoundSourcePool Class Reference

A pool of sound sources, which can be fetched based on availability. More...

#import <ALSoundSourcePool.h>

Inheritance diagram for ALSoundSourcePool:

Instance Methods

(void) - addSource:
 Add a source to this pool. More...
 
(void) - removeSource:
 Remove a source from this pool. More...
 
(id< ALSoundSource >) - getFreeSource:
 Acquire a free or freeable source from this pool. More...
 

Class Methods

(id) + pool
 Make a new pool. More...
 

Protected Attributes

NSMutableArray * sources
 All sources managed by this pool (id<ALSoundSource>). More...
 

Properties

NSArray * sources
 All sources managed by this pool (id<ALSoundSource>). More...
 

Detailed Description

A pool of sound sources, which can be fetched based on availability.

Method Documentation

- (void) addSource: (id<ALSoundSource>)  source

Add a source to this pool.

Parameters
sourceThe source to add.
- (id< ALSoundSource >) getFreeSource: (bool)  attemptToInterrupt

Acquire a free or freeable source from this pool.

It first attempts to find a completely free source. Failing this, it will attempt to interrupt a source and return that (if attemptToInterrupt is TRUE).

Parameters
attemptToInterruptIf TRUE, attempt to interrupt sources to free them for use.
Returns
The freed sound source, or nil if no sources are freeable.
+ (id) pool

Make a new pool.

Returns
A new pool.
- (void) removeSource: (id<ALSoundSource>)  source

Remove a source from this pool.

Parameters
sourceThe source to remove.

Member Data Documentation

- (NSMutableArray*) sources
protected

All sources managed by this pool (id<ALSoundSource>).

Property Documentation

- (NSArray*) sources
readnonatomicretain

All sources managed by this pool (id<ALSoundSource>).


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