Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

openalpp::GroupSource Class Reference

#include <groupsource.h>

Inheritance diagram for openalpp::GroupSource:

openalpp::SourceBase openalpp::PositionedObject openalpp::AudioBase openalpp::Referenced List of all members.

Public Member Functions

 GroupSource (float x=0.0, float y=0.0, float z=0.0) throw (NameError)
void play () throw (InitError,FileError)
void mixSources (unsigned int frequency=22050) throw (InitError,FileError,FatalError,MemoryError,ValueError)
ALuint includeSource (Source *source) throw (ValueError)
void excludeSource (const Source &source) throw (NameError)
void excludeSource (ALuint source) throw (NameError)
 GroupSource (const GroupSource &groupsource)
GroupSourceoperator= (const GroupSource &groupsource)

Protected Member Functions

virtual ~GroupSource ()

Detailed Description

Class for group sources. Used for mixing together several sources _before_ they are played. This can be used to play more sounds with less processing power. Of course the problem is that the sources cannot be moved separately.


Constructor & Destructor Documentation

openalpp::GroupSource::GroupSource float  x = 0.0,
float  y = 0.0,
float  z = 0.0
throw (NameError)
 

Constructor. Creates the group source at the specified position.

Parameters:
x x coordinate.
y y coordinate.
z z coordinate.

openalpp::GroupSource::GroupSource const GroupSource groupsource  ) 
 

Copy constructor.

virtual openalpp::GroupSource::~GroupSource  )  [protected, virtual]
 

Destructor.


Member Function Documentation

void openalpp::GroupSource::excludeSource ALuint  source  )  throw (NameError)
 

Removes a source from the group. This will of course require the remaining sources to be mixed again.

Parameters:
source is the identifier of the source to exclude.

void openalpp::GroupSource::excludeSource const Source source  )  throw (NameError)
 

Removes a source from the group. This will of course require the remaining sources to be mixed again.

Parameters:
source is the source to exclude.

ALuint openalpp::GroupSource::includeSource Source source  )  throw (ValueError)
 

Includes a source in the group. Returns an identifier that can be used as an argument to ExcludeSource(). This identifier is also the OpenAL name for the included source.

Parameters:
source is (a pointer to) the source to include.
Returns:
identifier for the source.

void openalpp::GroupSource::mixSources unsigned int  frequency = 22050  )  throw (InitError,FileError,FatalError,MemoryError,ValueError)
 

Mix all added sources into one. This function will be called by Play(), if sources have been included since the last time MixSamples() was called, so if you want the source to start playing as fast as possible after the Play()-call, MixSources() should be called separately

Parameters:
frequency is the frequency that will be used when mixing.

GroupSource& openalpp::GroupSource::operator= const GroupSource groupsource  ) 
 

Assignment operator.

void openalpp::GroupSource::play  )  throw (InitError,FileError)
 

Same as SourceBase::Play, except that this mixes the sources in the group if it haven't been done yet.

Reimplemented from openalpp::SourceBase.


The documentation for this class was generated from the following file:
Generated on Wed Mar 23 01:08:44 2005 for openalpp by  doxygen 1.4.0